Przeglądaj źródła

pdecsub.pas, pd_virtual:
* generate error if method is generic

git-svn-id: trunk@31765 -

svenbarth 10 lat temu
rodzic
commit
5316ae6a49
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      compiler/pdecsub.pas

+ 2 - 0
compiler/pdecsub.pas

@@ -1698,6 +1698,8 @@ begin
   if (pd.proctypeoption=potype_constructor) and
      is_object(tprocdef(pd).struct) then
     Message(parser_e_constructor_cannot_be_not_virtual);
+  if pd.is_generic then
+    message(parser_e_genfuncs_cannot_be_virtual);
   if is_objectpascal_helper(tprocdef(pd).struct) and
       (m_objfpc in current_settings.modeswitches) then
     Message1(parser_e_not_allowed_in_helper, arraytokeninfo[_VIRTUAL].str);