IDE: Visual Studio 2013
Version: 8.4.96.2033
Description:
In previous versions the following code worked properly:
Class1.pas
namespace SharedProject1;
interface
type
TC1 = public class(Object) mapped to
{$IF ECHOES}
TNetC1
{$ELSEIF COOPER}
TJavaC1
{$ELSEIF TOFFEE}
TCocoaC1
{$ENDIF}
public
constructor; mapped to constructor;
method Add(AValue: Integer): Integer; mapped to Add(AValue);
property pro1: Integer read mapped.pro1;
end;
{$IF ECHOES}
TNetC1 = public class
private
Fpro1: Integer;
public
constructor;
method Add(AValue: Integer): Integer;
property pro1: Integer read Fpro1 write Fpro1;
end;
{$ELSEIF COOPER}
TJavaC1 = public class
private
Fpro1: Integer;
public
constructor;
method Add(AValue: Integer): Integer;
property pro1: Integer read Fpro1 write Fpro1;
end;
{$ELSEIF TOFFEE}
TCocoaC1 = public class
private
Fpro1: Integer;
public
constructor;
method Add(AValue: Integer): Integer;
property pro1: Integer read Fpro1 write Fpro1;
end;
{$ENDIF}
implementation
{$IF ECHOES}
constructor TNetC1;
begin
Fpro1 := 1;
end;
method TNetC1.Add(AValue: Integer): Integer;
begin
end;
{$ELSEIF COOPER}
constructor TJavaC1;
begin
Fpro1 := 1;
end;
method TJavaC1.Add(AValue: Integer): Integer;
begin
end;
{$ELSEIF TOFFEE}
constructor TCocoaC1;
begin
Fpro1 := 1;
end;
method TCocoaC1.Add(AValue: Integer): Integer;
begin
end;
{$ENDIF}
end.
Class2.pas
namespace SharedProject1;
interface
type
TC2 = public class(TC1) mapped to
{$IF ECHOES}
TNetC2
{$ELSEIF COOPER}
TJavaC2
{$ELSEIF TOFFEE}
TCocoaC2
{$ENDIF}
private
protected
public
end;
{$IF ECHOES}
TNetC2 = public class(TNetC1)
private
Fvar: Integer;
public
constructor;
end;
{$ELSEIF COOPER}
TJavaC2 = public class(TJavaC1)
private
Fvar: Integer;
public
constructor;
end;
{$ELSEIF TOFFEE}
TCocoaC2 = public class(TCocoaC1)
private
Fvar: Integer;
public
constructor;
end;
{$ENDIF}
implementation
{$IF ECHOES}
constructor TNetC2;
begin
Fvar := 1;
end;
{$ELSEIF COOPER}
constructor TJavaC2;
begin
Fvar := 1;
end;
{$ELSEIF TOFFEE}
constructor TCocoaC2;
begin
Fvar := 1;
end;
{$ENDIF}
end.
Now the following code fails in all platforms.
With the methods it works correctly, but not with the properties.
var aa := new TC2;
var bb := aa.Add(2); // OK
var cc := aa.pro1; // not OK
Error 1 (E406) No overloaded method “pro1” with these parameters on type “TC2”, best matching overload is “class method pro1(&self: TC1): Int32” C:\Mis archivos\Projects\SendaSoft\Oxygene\Bugs\Bugs 2016.08.20 - 1\org.me.androidapplication1\WPFApplication1\Window1.xaml.pas 32 13 WPFApplication1
Error 2 (E406) No overloaded method “pro1” with these parameters on type “TC2”, best matching overload is “class method pro1(&self: TC1): Int32” C:\Mis archivos\Projects\SendaSoft\Oxygene\Bugs\Bugs 2016.08.20 - 1\org.me.androidapplication1\EmptyProject1\Program.pas 21 13 EmptyProject1
Error 3 (E406) No overloaded method “pro1” with these parameters on type “TC2”, best matching overload is “class method getpro1(&self: TC1): Integer” C:\Mis archivos\Projects\SendaSoft\Oxygene\Bugs\Bugs 2016.08.20 - 1\org.me.androidapplication1\org.me.androidapplication1\MainActivity.pas 31 13 org.me.androidapplication1
Is there a workaround for this problem or reinstall the previous version of Elements?
I attached project and screenshot.
Bug251.rar (534.8 KB)
Bug251-AnotherSample.rar (409.6 KB)
Best regards,
Jose A.