From ff6ab60508e796dba2c71e64b160f10d9c8d0930 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 10 Apr 2011 19:40:18 +0000 Subject: [PATCH] * prefer typecast currency->extended over currency->single/double because the former loses no precision while the latter might cause a loss of precision, resolves #19077 git-svn-id: trunk@17297 - --- .gitattributes | 1 + compiler/defcmp.pas | 3 ++- tests/webtbs/tw19077.pp | 13 +++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 tests/webtbs/tw19077.pp diff --git a/.gitattributes b/.gitattributes index 696628de88..b6a8d52441 100644 --- a/.gitattributes +++ b/.gitattributes @@ -11282,6 +11282,7 @@ tests/webtbs/tw1896.pp svneol=native#text/plain tests/webtbs/tw1901.pp svneol=native#text/plain tests/webtbs/tw1902.pp svneol=native#text/plain tests/webtbs/tw1907.pp svneol=native#text/plain +tests/webtbs/tw19077.pp svneol=native#text/pascal tests/webtbs/tw1908.pp svneol=native#text/plain tests/webtbs/tw1909.pp svneol=native#text/plain tests/webtbs/tw1910.pp svneol=native#text/plain diff --git a/compiler/defcmp.pas b/compiler/defcmp.pas index f917a15a55..31c7a451d9 100644 --- a/compiler/defcmp.pas +++ b/compiler/defcmp.pas @@ -564,7 +564,8 @@ implementation begin doconv:=tc_real_2_real; { do we lose precision? } - if def_to.size1.6 then + halt(1); + writeln('ok'); +end. + +