Json 0 Posted Friday at 08:48 AM unit Unit2; interface uses System.Classes; type TTestClass = class public procedure Test<T: record>; end; implementation //procedure TTestClass.Test<T: record>; //begin // [dcc32 Error] Unit2.pas(21): E2029 ',', ';' or '>' expected but ':' found //end; procedure TTestClass.Test<T>; begin end; end. Delphi 11.3 Why do I need to leave out : record in the implementation for the code to compile? Share this post Link to post
Stefan Glienke 2104 Posted Friday at 09:48 AM (edited) Because the language spec - pardon, the compiler - says so. Constraints on generics are part of the declaration. Edited Friday at 09:49 AM by Stefan Glienke 2 1 Share this post Link to post