diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 06e691076..cab66cc6e 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 = "2484"; + public const string Revision = "2485"; 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 c36a538aa..04ab0649f 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%COREVERSION%=3 -%REVISION%=2484 %MINOR%=6 +%REVISION%=2485 +%COREVERSION%=3 %MAJOR%=3 diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index 95bcf65e9..a3474b3eb 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.6.3.2484 +3.6.3.2485 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 695e1c11f..0227d5f61 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.6.3.2484' +!define VERSION '3.6.3.2485' diff --git a/TestSuite/AccessToFieldBaseInPropInGenClass.pas b/TestSuite/AccessToFieldBaseInPropInGenClass.pas new file mode 100644 index 000000000..44276a558 --- /dev/null +++ b/TestSuite/AccessToFieldBaseInPropInGenClass.pas @@ -0,0 +1,13 @@ +type + A = class + fielda: T; + end; + + B = class(A) + property PropA: T read fielda; + end; + +begin + var b1 := new B; + Assert(b1.PropA = 0); +end. \ No newline at end of file diff --git a/TestSuite/AccessToFieldBaseInPropInGenClass1.pas b/TestSuite/AccessToFieldBaseInPropInGenClass1.pas new file mode 100644 index 000000000..c2c0fd6c0 --- /dev/null +++ b/TestSuite/AccessToFieldBaseInPropInGenClass1.pas @@ -0,0 +1,13 @@ +type + A = class + fielda: integer := 1; + end; + + B = class(A) + property PropA: integer read fielda; + end; + +begin + var b1 := B&.Create; + Assert(b1.Propa = 1); +end. \ No newline at end of file diff --git a/TestSuite/AccessToFieldBaseInPropInGenClass2.pas b/TestSuite/AccessToFieldBaseInPropInGenClass2.pas new file mode 100644 index 000000000..e04fa06e2 --- /dev/null +++ b/TestSuite/AccessToFieldBaseInPropInGenClass2.pas @@ -0,0 +1,14 @@ +type + A = class + fielda: integer := 1; + end; + + B = class(A) + property PropA: integer write fielda read fielda; + end; + +begin + var b1 := B&.Create; + b1.Propa := 2; + Assert(b1.Propa = 2); +end. \ No newline at end of file diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index 6bd30dc75..e9292ab48 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -4652,7 +4652,7 @@ namespace PascalABCCompiler.TreeConverter } } common_method_node cmn = new common_method_node( - AcessorName, loc, cf.cont_type, + AcessorName, loc, /*cf.cont_type,*/ cpn.comprehensive_type as common_type_node, cf.polymorphic_state, context.get_field_access_level(), null); cpn.common_comprehensive_type.methods.AddElement(cmn); common_parameter cp = new common_parameter( @@ -4671,7 +4671,7 @@ namespace PascalABCCompiler.TreeConverter var_ref = new static_class_field_reference(cf, loc); } cmn.function_code = find_operator(compiler_string_consts.assign_name, var_ref, cpr, loc); - cf.cont_type.scope.AddSymbol(AcessorName, new SymbolInfo(cmn)); + cf.cont_type.Scope.AddSymbol(AcessorName, new SymbolInfo(cmn)); return cmn; }