* 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
expectloc:=LOC_REGISTER
else
begin
if not(left.expectloc in [LOC_CREFERENCE,LOC_REFERENCE]) then
CGMessage(parser_e_illegal_expression);
expectloc:=left.expectloc;
end;
expectloc:=left.expectloc;
end;
function ttypeconvnode.first_nil_to_methodprocvar : tnode;
begin
first_nil_to_methodprocvar:=nil;
expectloc:=LOC_REFERENCE;
expectloc:=LOC_REGISTER;
end;

View File

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