diff options
author | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2012-09-06 15:12:02 +0000 |
---|---|---|
committer | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2012-09-06 15:12:02 +0000 |
commit | 986e9226be6c9d042b20c569126025ed59ca3766 (patch) | |
tree | 48954b29626f25ab34e77613eaaec1d5e42476b5 /compiler | |
parent | 90041581f1071a62324de861a32a9cccf9b185b2 (diff) | |
download | fpc-986e9226be6c9d042b20c569126025ed59ca3766.tar.gz |
* fix expectlocs for method pointers
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22342 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/ncnv.pas | 8 | ||||
-rw-r--r-- | compiler/nld.pas | 2 |
2 files changed, 3 insertions, 7 deletions
diff --git a/compiler/ncnv.pas b/compiler/ncnv.pas index fdc3832ecb..70a3793199 100644 --- a/compiler/ncnv.pas +++ b/compiler/ncnv.pas @@ -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; diff --git a/compiler/nld.pas b/compiler/nld.pas index c1ef457f5c..281a932edc 100644 --- a/compiler/nld.pas +++ b/compiler/nld.pas @@ -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; |