2
0
Эх сурвалжийг харах

* Real is now defined in the system unit being an unique type, fixes #7425

git-svn-id: trunk@4628 -
florian 19 жил өмнө
parent
commit
d7fe89c63d

+ 1 - 0
.gitattributes

@@ -7290,6 +7290,7 @@ tests/webtbs/tw7227.pp svneol=native#text/plain
 tests/webtbs/tw7276.pp svneol=native#text/plain
 tests/webtbs/tw7372.pp svneol=native#text/plain
 tests/webtbs/tw7379.pp svneol=native#text/plain
+tests/webtbs/tw7425.pp svneol=native#text/plain
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain
 tests/webtbs/uw0555.pp svneol=native#text/plain

+ 1 - 1
compiler/ppu.pas

@@ -43,7 +43,7 @@ type
 {$endif Test_Double_checksum}
 
 const
-  CurrentPPUVersion=63;
+  CurrentPPUVersion=64;
 
 { buffer sizes }
   maxentrysize = 1024;

+ 0 - 1
compiler/psystem.pas

@@ -233,7 +233,6 @@ implementation
             addtype('Double',s64floattype);
             { extended size is the best real type for the target }
             addtype('Extended',pbestrealtype^);
-            addtype('Real',s64floattype);
           end;
 {$ifdef x86}
         if target_info.system<>system_x86_64_win64 then

+ 7 - 0
rtl/inc/systemh.inc

@@ -65,6 +65,13 @@ Type
   Cardinal = LongWord;
   Integer  = SmallInt;
 
+  { moved here from psystem.pas
+    Delphi allows chose of overloaded procedure depending
+    on Real <-> Double, so use type here, see also tw7425.pp (FK) }
+{$ifndef VER2_0}
+  Real = type Double;
+{$endif VER2_0}
+
 {$ifdef CPUI386}
   {$define CPU32}
 

+ 15 - 0
tests/webtbs/tw7425.pp

@@ -0,0 +1,15 @@
+procedure a(r: double); overload;
+begin
+end;
+
+procedure a(r: real); overload;
+begin
+end;
+
+procedure a(r: extended); overload;
+begin
+end;
+
+begin
+  writeln(sizeof(real));
+end.