mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 15:47:53 +02:00
* fixed ofs(procedure) as well
git-svn-id: trunk@32205 -
This commit is contained in:
parent
c25585daee
commit
072139cdb7
@ -781,6 +781,15 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
|
||||
node:=hp;
|
||||
end;
|
||||
{ allows horrible ofs(typeof(TButton)^) code !! }
|
||||
if (node.nodetype=typeconvn) then
|
||||
with Ttypeconvnode(node) do
|
||||
if (left.nodetype=addrn) and equal_defs(uinttype,node.resultdef) then
|
||||
begin
|
||||
hp:=left;
|
||||
left:=nil;
|
||||
node.free;
|
||||
node:=hp;
|
||||
end;
|
||||
if (node.nodetype=addrn) then
|
||||
with Taddrnode(node) do
|
||||
if left.nodetype=derefn then
|
||||
|
@ -599,12 +599,15 @@ implementation
|
||||
if target_info.system in systems_managed_vm then
|
||||
message(parser_e_feature_unsupported_for_vm);
|
||||
consume(_LKLAMMER);
|
||||
in_args:=true;
|
||||
p1:=comp_expr(true,false);
|
||||
got_addrn:=true;
|
||||
p1:=factor(true,false,false);
|
||||
{ inside parentheses a full expression is allowed, see also tests\webtbs\tb27517.pp }
|
||||
if token<>_RKLAMMER then
|
||||
p1:=sub_expr(opcompare,true,false,p1);
|
||||
p1:=caddrnode.create(p1);
|
||||
do_typecheckpass(p1);
|
||||
got_addrn:=false;
|
||||
{ Ofs() returns a cardinal/qword, not a pointer }
|
||||
p1.resultdef:=uinttype;
|
||||
inserttypeconv_internal(p1,uinttype);
|
||||
consume(_RKLAMMER);
|
||||
statement_syssym:=p1;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user