diff --git a/TestSuite/classprops1.pas b/TestSuite/classprops1.pas index b397fef17..dc48dd9bc 100644 --- a/TestSuite/classprops1.pas +++ b/TestSuite/classprops1.pas @@ -1,11 +1,19 @@ -type TClass = class +type +TestEventHandler = procedure(value: integer); + +TClass = class +class event TestEvent: TestEventHandler; class a : integer := 4; +class property Prop1 : integer read a write a; + class constructor Create; begin +TestEvent+= TestEventHandler(set_Prop1); assert(a=4); +TestEvent(5); +assert(a=5); end; -class property Prop1 : integer read a write a; end; var t : TClass; diff --git a/TestSuite/inherited1.pas b/TestSuite/inherited1.pas index ce42f2ca4..2c19679e2 100644 --- a/TestSuite/inherited1.pas +++ b/TestSuite/inherited1.pas @@ -2,7 +2,14 @@ type TClass = class public function ToString: string; override; begin inherited ToString(); + Result := 'tt'+inherited ToString; + + var s0: string; + s0 := inherited ToString(); + + var s: string := 'ss' + inherited ToString(); + end; end; diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index c02b84c14..c61726590 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -14489,7 +14489,7 @@ namespace PascalABCCompiler.TreeConverter //return convertion_data_and_alghoritms.create_full_function_call(new expressions_list(), // si,lloc,blocks.converted_type,blocks.top_function,false); if (!(si.sym_info is common_in_function_function_node)) - return make_delegate_wrapper(null, si, lloc, false); + return make_delegate_wrapper(null, si, lloc, ((si.sym_info is common_method_node) && ((common_method_node)si.sym_info).IsStatic)); return convertion_data_and_alghoritms.create_full_function_call(new expressions_list(), si,lloc,context.converted_type,context.top_function,false); }