Delphi XE: class constructor doesn't get called in a class using generics
问题 Consider the following example (I am using Delphi XE): program Test; {$APPTYPE CONSOLE} type TTestClass<T> = class private class constructor CreateClass(); public constructor Create(); end; class constructor TTestClass<T>.CreateClass(); begin // class constructor is not called. this line never gets executed! Writeln('class created'); end; constructor TTestClass<T>.Create(); begin // this line, of course, is printed Writeln('instance created'); end; var test: TTestClass<Integer>; begin test :=