diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index e061978ee..0649268f6 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "3"; public const string Build = "0"; - public const string Revision = "1603"; + public const string Revision = "1605"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index bb466e777..27e965f3d 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %COREVERSION%=0 -%REVISION%=1603 +%REVISION%=1605 %MINOR%=3 %MAJOR%=3 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 618a09e58..37c7fc494 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.3.0.1603' +!define VERSION '3.3.0.1605' diff --git a/TestSuite/NewClassInClassField.pas b/TestSuite/NewClassInClassField.pas new file mode 100644 index 000000000..40ac1be3d --- /dev/null +++ b/TestSuite/NewClassInClassField.pas @@ -0,0 +1,8 @@ +Type + ИмяКласса_1 = class + ИмяКласса_2 := new class(d:=1); + end; +Begin + var s := new ИмяКласса_1; + Assert(s.ИмяКласса_2.d = 1); +End. \ No newline at end of file diff --git a/TreeConverter/TreeConversion/compilation_context.cs b/TreeConverter/TreeConversion/compilation_context.cs index 732e52a5b..f79932dd2 100644 --- a/TreeConverter/TreeConversion/compilation_context.cs +++ b/TreeConverter/TreeConversion/compilation_context.cs @@ -95,7 +95,7 @@ namespace PascalABCCompiler.TreeConverter SavedContext.compiled_tn = _compiled_tn; SavedContext.last_created_function = last_created_function; SavedContext.cycles_stack = _cycles_stack; - SavedContext.num_of_for_cycles = num_of_for_cycles; + //SavedContext.num_of_for_cycles = num_of_for_cycles; // num_of_for_cycles вычисляется и провоцирует ошибки! SavedContext._fal = _fal; SavedContext.member_decls = member_decls; SavedContext.types_predefined = _types_predefined; @@ -155,7 +155,7 @@ namespace PascalABCCompiler.TreeConverter _compiled_tn = SavedContext.compiled_tn; last_created_function = SavedContext.last_created_function; _cycles_stack = SavedContext.cycles_stack; - _num_of_for_cycles = SavedContext.num_of_for_cycles; + //_num_of_for_cycles = SavedContext.num_of_for_cycles; // ssm 31/12/17 отключил! num_of_for_cycles вычисляется и провоцирует ошибки! _fal = SavedContext._fal; member_decls = SavedContext.member_decls; _types_predefined = SavedContext.types_predefined; @@ -1801,8 +1801,9 @@ namespace PascalABCCompiler.TreeConverter case block_type.type_block: { throw new CompilerInternalError("For cycle in class body"); - } - } + //return 0; + } + } throw new CompilerInternalError("Invalid block type"); } set diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index a0b4d7e5f..d06f84b3d 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -15403,7 +15403,8 @@ namespace PascalABCCompiler.TreeConverter public override void visit(SyntaxTree.named_type_reference _named_type_reference) { - type_node tn = find_type(_named_type_reference, get_location(_named_type_reference)); + var loc = get_location(_named_type_reference); + type_node tn = find_type(_named_type_reference, loc); return_value(tn); }