new class alias |
Smart pascal source code
type TMyClass = class public constructor Create(x: String); begin WriteLn(ClassName); WriteLn(x); end; end; type TAlias = TMyClass; var myObj := new TAlias(' hello'); myObj := TAlias.Create(' world'); myObj := new(TAlias)(' !'); {<<< RESULT - CONSOLE LOG >>> ----------------------------- TMyClass hello TMyClass world TMyClass ! ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}