<div><div>Okay with the latest trunk version I tried compiling my generic classes. It seems there is a problem with fpc generics in that you cannot use a generic as a type parameter. e.g type TDictionary<K,V> = class(TEnumerable<TPair<K,V>>) ...</div>
<div><br></div><div>Given:</div><div><br></div><div>type</div><div> TCollection<T> = class</div><div> end;</div><div><br></div><div> TPair<K,V> = class</div><div> Key: K;</div><div> Value: V;</div><div>
end;</div><div><br></div><div>// Test</div><div><br></div><div>var</div><div> TestA: TCollection<TPair<String,Integer>>; // Fatal: Syntax error, "," expected but "<" found</div><div> TestB: TCollection<String>; // Okay</div>
<div><br></div><div>The same problem occurs with classes</div><div><br></div><div>type</div><div> TDictionaryA<K,V> = class(TCollection<TPair<K,V>>) // Fatal: Syntax error, "," expected but "<" found </div>
<div> end;</div></div><div><div><div><div> TDictionaryB<K,V> = class(TCollection<Integer>) // Okay</div><div> end;</div></div></div></div>