Dmitry Boyarintsev
2018-10-29 16:48:35 UTC
I'm using 3.0.4 (win32), could any one try it on a later version of the
compiler?
The code i'm compiling looks like this:
--------------
{$mode delphi}
type
Ttest = class(TObject)
public
Value: string;
end;
function Custom: extended;
begin
Result := 0;
end;
begin
// writeln( TTest(Custom).Value );
writeln( TTest(Exp).value);
end.
--------------
It gives the linking error:
sample.pas(17,1) Error: Undefined symbol:
SYSTEM_::=::\_EXP$EXTENDED::=::\EXTENDED
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:
Compiling sample.pas
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.
thanks,
Dmitry
compiler?
The code i'm compiling looks like this:
--------------
{$mode delphi}
type
Ttest = class(TObject)
public
Value: string;
end;
function Custom: extended;
begin
Result := 0;
end;
begin
// writeln( TTest(Custom).Value );
writeln( TTest(Exp).value);
end.
--------------
It gives the linking error:
sample.pas(17,1) Error: Undefined symbol:
SYSTEM_::=::\_EXP$EXTENDED::=::\EXTENDED
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:
Compiling sample.pas
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.
thanks,
Dmitry