mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 04:39:34 +02:00
* new bug
This commit is contained in:
parent
645ed0feb1
commit
cc33cec223
@ -1,7 +1,10 @@
|
|||||||
{ %fail }
|
{ %fail }
|
||||||
|
|
||||||
|
{$mode fpc}
|
||||||
|
|
||||||
var c: char;
|
var c: char;
|
||||||
p: pchar;
|
p: pchar;
|
||||||
begin
|
begin
|
||||||
|
{ Don't allow this in fpc modes, in delphi it should be allowed }
|
||||||
p := pchar(c);
|
p := pchar(c);
|
||||||
end.
|
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