* fix expectlocs for method pointers

git-svn-id: trunk@22342 -
This commit is contained in:
florian 2012-09-06 15:12:02 +00:00
parent 370d42035a
commit e18a9cccaa
2 changed files with 3 additions and 7 deletions

View File

@ -3137,18 +3137,14 @@ implementation
if tabstractprocdef(resultdef).is_addressonly then if tabstractprocdef(resultdef).is_addressonly then
expectloc:=LOC_REGISTER expectloc:=LOC_REGISTER
else else
begin
if not(left.expectloc in [LOC_CREFERENCE,LOC_REFERENCE]) then
CGMessage(parser_e_illegal_expression);
expectloc:=left.expectloc; expectloc:=left.expectloc;
end; end;
end;
function ttypeconvnode.first_nil_to_methodprocvar : tnode; function ttypeconvnode.first_nil_to_methodprocvar : tnode;
begin begin
first_nil_to_methodprocvar:=nil; first_nil_to_methodprocvar:=nil;
expectloc:=LOC_REFERENCE; expectloc:=LOC_REGISTER;
end; end;

View File

@ -438,7 +438,7 @@ implementation
{ method pointer or nested proc ? } { method pointer or nested proc ? }
if assigned(left) then if assigned(left) then
begin begin
expectloc:=LOC_CREFERENCE; expectloc:=LOC_CREGISTER;
firstpass(left); firstpass(left);
end; end;
end; end;