From a65c2a0017d2e27bda2ec93e30f42cdacd37879b Mon Sep 17 00:00:00 2001 From: miks1965 Date: Mon, 5 Nov 2018 16:08:31 +0300 Subject: [PATCH] bug fix #1463 --- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 4 ++-- Localization/DefaultLang.resources | Bin 87490 -> 87752 bytes ReleaseGenerators/PascalABCNET_version.nsh | 2 +- TestSuite/CompilationSamples/PABCSystem.pas | 2 +- .../TreeConversion/syntax_tree_visitor.cs | 12 ++++++++++++ bin/Lng/Eng/SemanticErrors_ms.dat | 3 ++- bin/Lng/Rus/SemanticErrors_ms.dat | 3 ++- 8 files changed, 21 insertions(+), 7 deletions(-) diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index b8dd7f076..c9c13b1ce 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 = "4"; public const string Build = "2"; - public const string Revision = "1854"; + public const string Revision = "1857"; 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 e74bba2f3..c7fed2a4e 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%MINOR%=4 -%REVISION%=1854 %COREVERSION%=2 +%REVISION%=1857 +%MINOR%=4 %MAJOR%=3 diff --git a/Localization/DefaultLang.resources b/Localization/DefaultLang.resources index 0708ad909138316fb5381bd21b9c4c1b6e818cb0..6f6318ca8db1a05169aaf6bb79ad20aebb5e00d9 100644 GIT binary patch delta 229 zcmVd45?e6R#^62m7AnoNK?C#_9@*v^+^86t0;PBw= zO6|-ubGiH-g|0NGePDn*kNmNBdUqeAmOjDOn0Rbcy f;``_B;`<?^|AnfJx?&Pzqbrx1$3AB~uI&50(G` diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 68619dca6..0bb02d3a3 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.4.2.1854' +!define VERSION '3.4.2.1857' diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index 36f086d8b..4533d382d 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -1948,8 +1948,8 @@ var ///-- PrintDelimDefault: string := ' '; -///-- var +///-- __CONFIG__: Dictionary := new Dictionary; // Вспомогательные подпрограммы. Из раздела интерфейса не убирать!!! diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index b9dd22b4d..b2f9a7cd8 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -15830,6 +15830,18 @@ namespace PascalABCCompiler.TreeConverter public override void visit(SyntaxTree.var_def_statement _var_def_statement) { + if (_var_def_statement.vars_type != null && _var_def_statement.vars_type is procedure_header) + { + var ph = _var_def_statement.vars_type as procedure_header; + if (ph.parameters != null) + foreach (var x in ph.parameters.params_list) + { + if (x.inital_value != null) + AddError(get_location(x.inital_value), "DEFAULT_PARAMS_IN_DELEGATE_TYPE"); // SSM bug fix #1463 + } + + } + if (_var_def_statement.vars_type == null && _var_def_statement.inital_value is SyntaxTree.function_lambda_definition) AddError(get_location(_var_def_statement.inital_value), "IMPOSSIBLE_TO_INFER_TYPES_IN_LAMBDA"); //lroman// diff --git a/bin/Lng/Eng/SemanticErrors_ms.dat b/bin/Lng/Eng/SemanticErrors_ms.dat index 9a5a3293f..ca208fd86 100644 --- a/bin/Lng/Eng/SemanticErrors_ms.dat +++ b/bin/Lng/Eng/SemanticErrors_ms.dat @@ -15,4 +15,5 @@ NAME_IN_PROPERTY_READ_SECTION_MUST_BE_FIELD_OR_METHOD_NAME=Name in property read NAME_IN_PROPERTY_WRITE_SECTION_MUST_BE_FIELD_OR_METHOD_NAME=Name in property write section must be field name or method name of this class STATIC_PROPERTY_MUST_HAVE_STATIC_ACCESSOR=Static property accessor must be static ENUMS_CANNOT_BE_GENERIC=Enumerator type cannot be generic -PROGRAM_NAME_FOR_TYPE_NAME_IS_PROHIBITED=The name 'program' is prohibited as type name \ No newline at end of file +PROGRAM_NAME_FOR_TYPE_NAME_IS_PROHIBITED=The name 'program' is prohibited as type name +DEFAULT_PARAMS_IN_DELEGATE_TYPE=Procedure type cannot have default parameters \ No newline at end of file diff --git a/bin/Lng/Rus/SemanticErrors_ms.dat b/bin/Lng/Rus/SemanticErrors_ms.dat index 7234d575e..3c969792e 100644 --- a/bin/Lng/Rus/SemanticErrors_ms.dat +++ b/bin/Lng/Rus/SemanticErrors_ms.dat @@ -16,4 +16,5 @@ NAME_IN_PROPERTY_READ_SECTION_MUST_BE_FIELD_OR_METHOD_NAME=Имя в секци NAME_IN_PROPERTY_WRITE_SECTION_MUST_BE_FIELD_OR_METHOD_NAME=Имя в секции write свойства должно быть именем поля или процедуры-метода этого класса STATIC_PROPERTY_MUST_HAVE_STATIC_ACCESSOR=Акцессор статического свойства должен быть статическим ENUMS_CANNOT_BE_GENERIC=Перечислимый тип не может быть обобщенным -PROGRAM_NAME_FOR_TYPE_NAME_IS_PROHIBITED=Имя 'program' запрещено в качестве имени типа \ No newline at end of file +PROGRAM_NAME_FOR_TYPE_NAME_IS_PROHIBITED=Имя 'program' запрещено в качестве имени типа +DEFAULT_PARAMS_IN_DELEGATE_TYPE=В процедурном типе не могут быть параметры по умолчанию \ No newline at end of file