[fpc-pascal] odd compiling + linking error (with invalid casting of Exp)
skalogryz.lists at gmail.com
Mon Oct 29 17:48:35 CET 2018
I'm using 3.0.4 (win32), could any one try it on a later version of the
The code i'm compiling looks like this:
Ttest = class(TObject)
function Custom: extended;
Result := 0;
// writeln( TTest(Custom).Value );
It gives the linking error:
sample.pas(17,1) Error: Undefined symbol:
sample.pas(17,1) Fatal: There were 1 errors compiling module, stopping
If one un-comments the line with invalid Custom() cast, they would get a
compiling error instead:
sample.pas(15,12) Error: Illegal type conversion: "Extended" to "Ttest"
(which is expected).
Is the issue known? worth bug reporting?
(clearly a compiler error should be thrown, rather than a linker error)
The issue I actually ran into is with a bigger project:
Error: Undefined symbol: SYSTEM_::=::\_EXP$EXTENDED::=::\EXTENDED
doesn't indicate the source code or line numbers.
So catching the problem might be tricky.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal