← board

Classes has no TCollection family

uses Classes;
var Collection: TCollection; Item: TCollectionItem;
begin
  Collection := TCollection.Create(TCollectionItem);   { unknown type }

pxx: pascal26:71: error: a statement cannot start with '.' — the parser has already failed on the type name and the message is about the token it stopped at. fpc 3.2.2 compiles and runs it.

Why it is filed now

Found while burning the for-in / enumerator cluster of the FPC-testsuite corpus (tforin8, tforin24, tforin2 all closed 2026-09-09). tenumerators1.pp exercises five containers by hand; four of them now work and the fifth is this. The row's skip reason names this ticket and says the row should pass once the family exists — a prediction, not a measurement, and it says so there too.

What FPC's shape is

rtl/objpas/classes/classesh.inc: TCollectionItem (owned by a collection, carries Index, DisplayName, Collection), TCollection (owns items of a declared TCollectionItemClass, Add, Clear, Delete, Count, Items[], plus the Notify/Update hooks descendants override) and TCollectionEnumerator in the same plain-class shape as the four that landed today. TOwnedCollection adds an owner and is a two-line descendant.

The enumerator half is trivial once the two classes exist — copy any of the four in classes.pas, which are deliberately uniform for that reason.