Sfoglia il codice sorgente

* fix expectlocs for method pointers

git-svn-id: trunk@22342 -
florian 13 anni fa
parent
commit
e18a9cccaa
2 ha cambiato i file con 3 aggiunte e 7 eliminazioni
  1. 2 6
      compiler/ncnv.pas
  2. 1 1
      compiler/nld.pas

+ 2 - 6
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;
 
 

+ 1 - 1
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;