IDE: _Visual Studio 2015
Version: _Elements 9.1.100.2075
Target (If relevant): Android
Description:
The following code works perfectly in NET and iOS, but in Android it produces an error.
type
Class1 = public class
protected
method getprop: Integer; virtual;
public
property prop: Integer read getprop;
end;
Class2 = public class(Class1)
protected
method getprop: Integer; override;
public
end;
implementation
method Class1.getprop: Integer;
begin
exit 1;
end;
method Class2.getprop: Integer;
begin
exit 2;
end;
Gravedad Código Descripción Proyecto Archivo Línea Estado de supresión
Error (E212) Cannot override method “method Class2.getprop(): Integer” defined in parent class “Class1” with a lower visibility than the original method, which is “public” ClassLibrary2 E:\Mis Archivos\Projects\SendaSoft\Oxygene\Bugs\Bugs 2016.12.12 - 1\ClassLibrary1\SharedProject1\Class1.pas 15
I attach project and screenshot.
Bug278.rar (275.5 KB)
Best regards,
Jose A.