mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 06:29:32 +02:00
* new bug
This commit is contained in:
parent
645ed0feb1
commit
cc33cec223
@ -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.
|
||||
|
28
tests/webtbf/tw3395.pp
Normal file
28
tests/webtbf/tw3395.pp
Normal file
@ -0,0 +1,28 @@
|
||||
{ %fail }
|
||||
|
||||
{$MODE DELPHI}
|
||||
|
||||
type
|
||||
texec1 = class
|
||||
protected
|
||||
procedure execute;
|
||||
public
|
||||
constructor create;
|
||||
end;
|
||||
|
||||
procedure t(p: pointer);
|
||||
begin
|
||||
end;
|
||||
|
||||
constructor texec1.Create;
|
||||
begin
|
||||
{ THis is not allowed }
|
||||
t(@execute);
|
||||
end;
|
||||
|
||||
procedure texec1.execute;
|
||||
begin
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
Loading…
Reference in New Issue
Block a user