Вдогонку к свойствам с полем в надклассе
This commit is contained in:
parent
f0db733c96
commit
51f3d79066
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%COREVERSION%=3
|
||||
%REVISION%=2484
|
||||
%MINOR%=6
|
||||
%REVISION%=2485
|
||||
%COREVERSION%=3
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.6.3.2484
|
||||
3.6.3.2485
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.6.3.2484'
|
||||
!define VERSION '3.6.3.2485'
|
||||
|
|
|
|||
13
TestSuite/AccessToFieldBaseInPropInGenClass.pas
Normal file
13
TestSuite/AccessToFieldBaseInPropInGenClass.pas
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
type
|
||||
A<T> = class
|
||||
fielda: T;
|
||||
end;
|
||||
|
||||
B<T> = class(A<T>)
|
||||
property PropA: T read fielda;
|
||||
end;
|
||||
|
||||
begin
|
||||
var b1 := new B<integer>;
|
||||
Assert(b1.PropA = 0);
|
||||
end.
|
||||
13
TestSuite/AccessToFieldBaseInPropInGenClass1.pas
Normal file
13
TestSuite/AccessToFieldBaseInPropInGenClass1.pas
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
type
|
||||
A<T> = class
|
||||
fielda: integer := 1;
|
||||
end;
|
||||
|
||||
B<T> = class(A<T>)
|
||||
property PropA: integer read fielda;
|
||||
end;
|
||||
|
||||
begin
|
||||
var b1 := B&<integer>.Create;
|
||||
Assert(b1.Propa = 1);
|
||||
end.
|
||||
14
TestSuite/AccessToFieldBaseInPropInGenClass2.pas
Normal file
14
TestSuite/AccessToFieldBaseInPropInGenClass2.pas
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
type
|
||||
A<T> = class
|
||||
fielda: integer := 1;
|
||||
end;
|
||||
|
||||
B<T> = class(A<T>)
|
||||
property PropA: integer write fielda read fielda;
|
||||
end;
|
||||
|
||||
begin
|
||||
var b1 := B&<integer>.Create;
|
||||
b1.Propa := 2;
|
||||
Assert(b1.Propa = 2);
|
||||
end.
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue