[fpc-pascal] problems while compiling androidr14.inc

Jonas Maebe jonas at freepascal.org
Wed Apr 17 17:10:42 CEST 2019


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



More information about the fpc-pascal mailing list