From 21a2675b0aa24e89089d0b00d57641d4cf9cf379 Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Thu, 28 May 2020 22:09:01 +0300 Subject: [PATCH] fix #2240 --- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 4 ++-- Release/pabcversion.txt | 2 +- ReleaseGenerators/PascalABCNET_version.nsh | 2 +- TestSuite/CompilationSamples/GraphWPF.pas | 4 +++- TestSuite/CompilationSamples/PABCSystem.pas | 2 +- TestSuite/ToMatrixArrOfArrT.pas | 9 +++++++++ TreeConverter/TreeConversion/syntax_tree_visitor.cs | 2 +- 8 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 TestSuite/ToMatrixArrOfArrT.pas diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 1faced9b3..3cd40e354 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 = "6"; public const string Build = "3"; - public const string Revision = "2490"; + public const string Revision = "2491"; 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 832704a0f..d45043223 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%COREVERSION%=3 -%REVISION%=2490 %MINOR%=6 +%REVISION%=2491 +%COREVERSION%=3 %MAJOR%=3 diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index d496a6a19..b6f688565 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.6.3.2490 +3.6.3.2491 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 1effe89d8..3d427896e 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.6.3.2490' +!define VERSION '3.6.3.2491' diff --git a/TestSuite/CompilationSamples/GraphWPF.pas b/TestSuite/CompilationSamples/GraphWPF.pas index 2b9dcd9d7..66f576291 100644 --- a/TestSuite/CompilationSamples/GraphWPF.pas +++ b/TestSuite/CompilationSamples/GraphWPF.pas @@ -42,9 +42,11 @@ type GPen = System.Windows.Media.Pen; /// Тип точки Point = System.Windows.Point; - /// Тип вектора + /// Тип точки GPoint = System.Windows.Point; + /// Тип вектора Vector = System.Windows.Vector; + /// Тип кисти GBrush = System.Windows.Media.Brush; /// Тип стиля шрифта FontStyle = (Normal,Bold,Italic,BoldItalic); diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index 5180aa300..f818ddac8 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -10699,7 +10699,7 @@ begin Result := a; end; -/// Возвращает массив строк двумерного массива +/// Возвращает массив столбцов двумерного массива function Cols(Self: array [,] of T): array of array of T; extensionmethod; type ArrT = array of T; begin diff --git a/TestSuite/ToMatrixArrOfArrT.pas b/TestSuite/ToMatrixArrOfArrT.pas new file mode 100644 index 000000000..7d5a01af8 --- /dev/null +++ b/TestSuite/ToMatrixArrOfArrT.pas @@ -0,0 +1,9 @@ +procedure ToMatrix(Self: array of array of T); extensionmethod; +begin + Assert(2=2) +end; + +begin + var a: array of array of integer; + a.ToMatrix; +end. \ No newline at end of file diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index e9292ab48..db7830e32 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -13841,7 +13841,7 @@ namespace PascalABCCompiler.TreeConverter SymbolInfo si = new SymbolInfo(context.top_function); si.symbol_kind = symbol_kind.sk_overload_function; top_function.ConnectedToType.Scope.AddSymbol(top_function.name, si); - if (top_function.ConnectedToType.type_special_kind == SemanticTree.type_special_kind.array_kind && top_function.ConnectedToType.element_type.is_generic_parameter) + if (top_function.ConnectedToType.type_special_kind == SemanticTree.type_special_kind.array_kind /*&& top_function.ConnectedToType.element_type.is_generic_parameter*/) top_function.ConnectedToType.base_type.Scope.AddSymbol(top_function.name, new SymbolInfo(context.top_function)); else if (top_function.ConnectedToType.is_generic_parameter) top_function.ConnectedToType.base_type.Scope.AddSymbol(top_function.name, new SymbolInfo(context.top_function));