diff --git a/ReleaseGenerators/PABCRtl/PABCRtl.pas b/ReleaseGenerators/PABCRtl/PABCRtl.pas index d04554106..449c65873 100644 --- a/ReleaseGenerators/PABCRtl/PABCRtl.pas +++ b/ReleaseGenerators/PABCRtl/PABCRtl.pas @@ -6,6 +6,6 @@ uses DrawManField, Events, FilesOperations, GraphABC, GraphABCHelper, IniFile, PointerTools, PointRect, Robot, RobotField, RobotTaskMaker, RobotZadan, Sockets, Utils, VCL, Timers, PT4TaskMakerNET, RBDMUtils, SF, School, BlockFileOfT, - FormsABC, Collections, Arrays, ClientServer, WPFObjects, Graph3D, GraphWPF, __RedirectIOMode, __RunMode, __RtlUtils; + FormsABC, Collections, Arrays, ClientServer, WPFObjects, Controls, Graph3D, GraphWPF, __RedirectIOMode, __RunMode, __RtlUtils; end. \ No newline at end of file diff --git a/ReleaseGenerators/PABCRtl/PABCRtl32.pas b/ReleaseGenerators/PABCRtl/PABCRtl32.pas index 5277da7d7..d66f9f06e 100644 --- a/ReleaseGenerators/PABCRtl/PABCRtl32.pas +++ b/ReleaseGenerators/PABCRtl/PABCRtl32.pas @@ -6,6 +6,6 @@ uses DrawManField, Events, FilesOperations, GraphABC, GraphABCHelper, IniFile, PointerTools, PointRect, Robot, RobotField, RobotTaskMaker, RobotZadan, Sockets, Utils, VCL, Timers, PT4, PT4TaskMakerNET, RBDMUtils, SF, School, BlockFileOfT, - FormsABC, Collections, Arrays, ClientServer, Graph3D, GraphWPF, WPFObjects, __RedirectIOMode, __RunMode, __RtlUtils; + FormsABC, Collections, Arrays, ClientServer, Graph3D, GraphWPF, WPFObjects, Controls, __RedirectIOMode, __RunMode, __RtlUtils; end. \ No newline at end of file diff --git a/TestSuite/errors/err0380.pas b/TestSuite/errors/err0380.pas new file mode 100644 index 000000000..134bb7598 --- /dev/null +++ b/TestSuite/errors/err0380.pas @@ -0,0 +1,9 @@ +type + t1 = class + event ev1: ()->(); + end; + +begin + var o := new t1; + o.ev1(); +end. \ No newline at end of file diff --git a/TestSuite/errors/err0381.pas b/TestSuite/errors/err0381.pas new file mode 100644 index 000000000..77f1c8dc9 --- /dev/null +++ b/TestSuite/errors/err0381.pas @@ -0,0 +1,13 @@ +type + t1 = class(List) + + public procedure Add(item: byte); override; + begin + inherited Add(item); + end; + + end; + +begin + new t1; +end. \ No newline at end of file diff --git a/TreeConverter/TreeConversion/compilation_context.cs b/TreeConverter/TreeConversion/compilation_context.cs index e2a7ed123..e9bb5b29e 100644 --- a/TreeConverter/TreeConversion/compilation_context.cs +++ b/TreeConverter/TreeConversion/compilation_context.cs @@ -3647,6 +3647,8 @@ namespace PascalABCCompiler.TreeConverter { return null; } + else if (cfn_sec.IsFinal) + return null; } else { diff --git a/bin/Lib/Controls.pas b/bin/Lib/Controls.pas index c8d19c896..46936b968 100644 --- a/bin/Lib/Controls.pas +++ b/bin/Lib/Controls.pas @@ -1239,6 +1239,11 @@ procedure SetActivePanel(p: PanelWPF); /// Графическое окно //function Window: WindowType; +///-- +procedure __InitModule__; +///-- +procedure __FinalizeModule__; + implementation //uses GraphWPF; @@ -1391,6 +1396,33 @@ begin Result := _ActivePanel; end; +var + ///-- + __initialized := false; + +var + ///-- + __finalized := false; + +///-- +procedure __InitModule__; +begin + if not __initialized then + begin + __initialized := true; + + end; +end; + +///-- +procedure __FinalizeModule__; +begin + if not __finalized then + begin + __finalized := true; + end; +end; + initialization finalization end. \ No newline at end of file