Last active
December 8, 2016 10:30
-
-
Save maciej-izak/f312ff683406e2b16003ee67ee1a95d1 to your computer and use it in GitHub Desktop.
FPC black list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program E01; | |
{$IFDEF FPC} | |
{$MODE DELPHI} | |
{$ENDIF} | |
{$APPTYPE CONSOLE} | |
type | |
TA = class | |
constructor Create(A: Integer = 0); overload; virtual; | |
end; | |
TB = class(TA) | |
constructor Create(A: Integer); overload; override; | |
end; | |
TClassB = class of TB; | |
constructor TA.Create(A: Integer = 0); | |
begin | |
WriteLn('TA.Create'); | |
end; | |
constructor TB.Create(A: Integer); | |
begin | |
WriteLn('TB.Create'); | |
end; | |
var | |
B: TB; | |
ClassB: TClassB; | |
begin | |
B := TB.Create; | |
B.Create; | |
B.Free; | |
ClassB := TB; | |
B := ClassB.Create; | |
B.Free; | |
ReadLn; | |
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program E02; | |
{$IFDEF FPC} | |
{$MODE DELPHI} | |
{$ENDIF} | |
{$APPTYPE CONSOLE} | |
type | |
TA = class | |
constructor Create(A: Integer = 0); overload; | |
end; | |
TB = class(TA) | |
constructor Create(A: Integer); overload; | |
end; | |
TClassB = class of TB; | |
constructor TA.Create(A: Integer = 0); | |
begin | |
WriteLn('TA.Create'); | |
end; | |
constructor TB.Create(A: Integer); | |
begin | |
WriteLn('TB.Create'); | |
end; | |
var | |
B: TB; | |
ClassB: TClassB; | |
begin | |
B := TB.Create; | |
B.Create; | |
B.Free; | |
ClassB := TB; | |
B := ClassB.Create; | |
B.Free; | |
ReadLn; | |
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program E03; | |
{$IFDEF FPC} | |
{$MODE DELPHI} | |
{$ENDIF} | |
{$APPTYPE CONSOLE} | |
type | |
T0 = class | |
class procedure Foo; | |
end; | |
TA = class(T0) | |
class procedure Foo(A: Integer = 0); overload; virtual; | |
end; | |
TB = class(TA) | |
class procedure Foo(A: Integer); overload; override; | |
end; | |
TClassB = class of TB; | |
class procedure T0.Foo(); | |
begin | |
WriteLn('T0.Foo'); | |
end; | |
class procedure TA.Foo(A: Integer = 0); | |
begin | |
WriteLn('TA.Foo'); | |
end; | |
class procedure TB.Foo(A: Integer); | |
begin | |
WriteLn('TB.Foo'); | |
end; | |
var | |
B: TB; | |
ClassB: TClassB; | |
begin | |
TB.Foo; | |
B := TB.Create; | |
B.Foo; | |
B.Free; | |
ClassB := TB; | |
ClassB.Foo; | |
ReadLn; | |
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program E04; | |
{$IFDEF FPC} | |
{$MODE DELPHI} | |
{$ENDIF} | |
{$APPTYPE CONSOLE} | |
type | |
T0 = class | |
class procedure Foo; | |
end; | |
TA = class(T0) | |
class procedure Foo(A: Integer = 0); overload; | |
end; | |
TB = class(TA) | |
class procedure Foo(A: Integer); overload; | |
end; | |
TClassB = class of TB; | |
class procedure T0.Foo(); | |
begin | |
WriteLn('T0.Foo'); | |
end; | |
class procedure TA.Foo(A: Integer = 0); | |
begin | |
WriteLn('TA.Foo'); | |
end; | |
class procedure TB.Foo(A: Integer); | |
begin | |
WriteLn('TB.Foo'); | |
end; | |
var | |
B: TB; | |
ClassB: TClassB; | |
begin | |
TB.Foo; | |
B := TB.Create; | |
B.Foo; | |
B.Free; | |
ClassB := TB; | |
ClassB.Foo; | |
ReadLn; | |
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program E05; | |
{$IFDEF FPC} | |
{$MODE DELPHI} | |
{$ENDIF} | |
{$APPTYPE CONSOLE} | |
type | |
T0 = class | |
procedure Foo; | |
end; | |
TA = class(T0) | |
procedure Foo(A: Integer = 0); overload; virtual; | |
end; | |
TB = class(TA) | |
procedure Foo(A: Integer); overload; override; | |
end; | |
TClassB = class of TB; | |
procedure T0.Foo(); | |
begin | |
WriteLn('T0.Foo'); | |
end; | |
procedure TA.Foo(A: Integer = 0); | |
begin | |
WriteLn('TA.Foo'); | |
end; | |
procedure TB.Foo(A: Integer); | |
begin | |
WriteLn('TB.Foo'); | |
end; | |
var | |
B: TB; | |
ClassB: TClassB; | |
begin | |
B := TB.Create; | |
B.Foo; | |
B.Free; | |
ReadLn; | |
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program E06; | |
{$IFDEF FPC} | |
{$MODE DELPHI} | |
{$ENDIF} | |
{$APPTYPE CONSOLE} | |
type | |
T0 = class | |
procedure Foo; | |
end; | |
TA = class(T0) | |
procedure Foo(A: Integer = 0); overload; | |
end; | |
TB = class(TA) | |
procedure Foo(A: Integer); overload; | |
end; | |
TClassB = class of TB; | |
procedure T0.Foo(); | |
begin | |
WriteLn('T0.Foo'); | |
end; | |
procedure TA.Foo(A: Integer = 0); | |
begin | |
WriteLn('TA.Foo'); | |
end; | |
procedure TB.Foo(A: Integer); | |
begin | |
WriteLn('TB.Foo'); | |
end; | |
var | |
B: TB; | |
ClassB: TClassB; | |
begin | |
B := TB.Create; | |
B.Foo; | |
B.Free; | |
ReadLn; | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment