mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 12:49:20 +02:00
parent
266daa62f1
commit
ac6e4f59c6
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -16100,6 +16100,7 @@ tests/webtbf/tw36223.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw3626.pp svneol=native#text/plain
|
||||
tests/webtbf/tw3631.pp svneol=native#text/plain
|
||||
tests/webtbf/tw36377.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw36397.pp -text svneol=native#text/pascal
|
||||
tests/webtbf/tw3643.pp svneol=native#text/plain
|
||||
tests/webtbf/tw3644.pp svneol=native#text/plain
|
||||
tests/webtbf/tw3662.pp svneol=native#text/plain
|
||||
|
@ -1380,7 +1380,12 @@ implementation
|
||||
not(po_staticmethod in tcallnode(p1).procdefinition.procoptions) and
|
||||
(not assigned(current_structdef) or
|
||||
not def_is_related(current_structdef,structh)) then
|
||||
Message(parser_e_only_static_members_via_object_type);
|
||||
begin
|
||||
p1.free;
|
||||
p1:=cerrornode.create;
|
||||
Message(parser_e_only_static_members_via_object_type);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
{ in Java, constructors are not automatically inherited
|
||||
-> calling a constructor from a parent type will create
|
||||
|
20
tests/webtbf/tw36397.pp
Normal file
20
tests/webtbf/tw36397.pp
Normal file
@ -0,0 +1,20 @@
|
||||
{ %fail }
|
||||
program Project1;
|
||||
|
||||
{$mode delphi}
|
||||
|
||||
type
|
||||
TTest = object
|
||||
class procedure myproc;
|
||||
end;
|
||||
|
||||
class procedure TTest.myproc;
|
||||
begin
|
||||
end;
|
||||
|
||||
var
|
||||
p: procedure;
|
||||
begin
|
||||
p := TTest.myproc;
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user