Chapter about Generic type specialization promotes (fixed) bug as a feature
Original Reporter info from Mantis: PascalDragon @PascalDragon
-
Reporter name: Sven Barth
Original Reporter info from Mantis: PascalDragon @PascalDragon
- Reporter name: Sven Barth
Description:
At the end of chapter &LtPos;i>8.3 Generic type specialization&LtPos;/i> there is the following paragraph:
Remark As of version 3.0, it is possible to make a forward definition of a generic class. In prior versions the compiler would generate an error if a forward declaration of a class was later defined as a generic specialization. This means that the following is now possible: {$mode objfpc} Type TMyClass = Class; // Other declarations TMyClass = specialize TList&LtPos;T>;
This is wrong. This was a bug and it's no longer allowed in 3.2.0.
Mantis conversion info:
- Mantis ID: 37848
- Version: 3.2.0
- Fixed in version: 3.3.1
- Fixed in revision: 1756 (#f7d63584).
- Target version: 3.2.2