Re: [fpc-pascal] problems while compiling androidr14.inc

2019-04-17 Thread Jonas Maebe

On 17/04/2019 17:05, Mgr. Janusz Chmiel wrote:
Please do you think, that this Free Pascal compiler error indicates, 
that some part of androidR14.inc unit have been compiled incorrectly?
C:\javavcl-code-1007\fpc\units\jvm-android\rtl\androidr14.inc(2750,15) 
Hint: (3274) Inherited methods can only be overridden in Objective-C and 
Java, add "override" (inherited method defined in JLObject).

Or it is OK and resulting classes will be correct and code will run?


It is fine.

These are only declarations for external classes. The tool that 
generates the declarations for the external classes cannot determine 
whether a method is new or inherited from a parent class, so it always 
adds "virtual" instead of "override" in case it's an overriding method. 
That is where the hint comes from. The actual classes are implemented in 
Java/Dalvik and part of the Android class libraries, and are correct.


If you would do the same with a class implemented in Pascal, then the 
compiler would print an error instead of a hint, because then the 
compiled code would not work as expected.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] problems while compiling androidr14.inc

2019-04-17 Thread Mgr. Janusz Chmiel
Please do you think, that this Free Pascal compiler error indicates, 
that some part of androidR14.inc unit have been compiled incorrectly?
C:\javavcl-code-1007\fpc\units\jvm-android\rtl\androidr14.inc(2750,15) 
Hint: (3274) Inherited methods can only be overridden in Objective-C and 
Java, add "override" (inherited method defined in JLObject).

Or it is OK and resulting classes will be correct and code will run?
Thank you very much for yours explanation.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal