Browse Source

+ add flag to denote that an objectdef is invokable, thus can be used like a function variable

Sven/Sarah Barth 3 years ago
parent
commit
f0748ad59b
2 changed files with 4 additions and 2 deletions
  1. 2 1
      compiler/symconst.pas
  2. 2 1
      compiler/utils/ppuutils/ppudump.pp

+ 2 - 1
compiler/symconst.pas

@@ -566,7 +566,8 @@ type
     oo_has_class_destructor,  { the object/class has a class destructor  }
     oo_is_enum_class,     { the class represents an enum (JVM) }
     oo_has_new_destructor,{ the object/class declares a destructor (apart from potentially inherting one from the parent) }
-    oo_is_funcref         { interface has a single Invoke method that can be directly called }
+    oo_is_funcref,        { interface has a single Invoke method that can be directly called }
+    oo_is_invokable       { interface that is invokable like a function }
   );
   tobjectoptions=set of tobjectoption;
 

+ 2 - 1
compiler/utils/ppuutils/ppudump.pp

@@ -3239,7 +3239,8 @@ const
      (mask:oo_has_class_destructor; str:'HasClassDestructor'),
      (mask:oo_is_enum_class;      str:'JvmEnumClass'),
      (mask:oo_has_new_destructor; str:'HasNewDestructor'),
-     (mask:oo_is_funcref;         str:'IsFuncRef')
+     (mask:oo_is_funcref;         str:'IsFuncRef'),
+     (mask:oo_is_invokable;       str:'IsInvokable')
   );
 var
   i      : longint;