Explorar el Código

* stop tcallnode.pass_1 after we've detected a direct call to a helper/
category method, as this may lead to an internalerror later on after
the following commits

git-svn-id: trunk@30907 -

Jonas Maebe hace 10 años
padre
commit
6c3f1c3722
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      compiler/ncal.pas

+ 6 - 1
compiler/ncal.pas

@@ -3837,7 +3837,12 @@ implementation
                (methodpointer.nodetype=typen) and
                is_objectpascal_helper(ttypenode(methodpointer).typedef) and
                not ttypenode(methodpointer).helperallowed then
-             Message(parser_e_no_category_as_types);
+             begin
+               CGMessage(parser_e_no_category_as_types);
+               { we get an internal error when trying to insert the hidden
+                 parameters in this case }
+               exit;
+             end;
 
            { can we get rid of the call? }
            if (cs_opt_remove_emtpy_proc in current_settings.optimizerswitches) and