mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 20:27:56 +02:00
* fix #40305: with type helpers now supporting inheriting from unique type aliases, declare a TRealHelper as a descendant of TDoubleHelper (cause Real is a Double)
+ added test
This commit is contained in:
parent
4ef30edbd4
commit
2ef822e8e8
@ -786,6 +786,11 @@ Type
|
||||
property Exp: QWord read GetE write SetE;
|
||||
property Frac: QWord read GetF write SetF;
|
||||
end;
|
||||
|
||||
{$IFNDEF VER3_2}
|
||||
TRealHelper = Type Helper(TDoubleHelper) for Real
|
||||
end;
|
||||
{$ENDIF}
|
||||
{$ENDIF FPC_HAS_TYPE_DOUBLE}
|
||||
|
||||
{$ifdef FPC_HAS_TYPE_EXTENDED}
|
||||
|
17
tests/webtbs/tw40305.pp
Normal file
17
tests/webtbs/tw40305.pp
Normal file
@ -0,0 +1,17 @@
|
||||
program tw40305;
|
||||
|
||||
{$mode objfpc}
|
||||
|
||||
uses
|
||||
SysUtils;
|
||||
|
||||
var
|
||||
r: Real;
|
||||
s: String;
|
||||
begin
|
||||
r := 2.42;
|
||||
FormatSettings.DecimalSeparator:='.';
|
||||
s := r.ToString;
|
||||
if s <> '2.42' then
|
||||
Halt(1);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user