@@ -1,7 +1,10 @@
{ %fail }
+{$mode fpc}
+
var c: char;
p: pchar;
begin
+ { Don't allow this in fpc modes, in delphi it should be allowed }
p := pchar(c);
end.
@@ -0,0 +1,28 @@
+{ %fail }
+{$MODE DELPHI}
+type
+ texec1 = class
+ protected
+ procedure execute;
+ public
+ constructor create;
+ end;
+ procedure t(p: pointer);
+ begin
+ constructor texec1.Create;
+ { THis is not allowed }
+ t(@execute);
+ procedure texec1.execute;
+begin
+end.