You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Konrad Grochowski (JIRA)" <ji...@apache.org> on 2014/10/09 17:35:33 UTC

[jira] [Updated] (THRIFT-2775) static assert fails in src/thrift/internal/ctfe.d

     [ https://issues.apache.org/jira/browse/THRIFT-2775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Konrad Grochowski updated THRIFT-2775:
--------------------------------------
    Attachment: THRIFT-2775_ctfe_assert_fail.patch

I've attached patch. In it only first few digits of generated string are compared. As always: float -> string is a tricky thing...
I also added (2.5) == "2.5" test which should behave better.

> static assert fails in src/thrift/internal/ctfe.d
> -------------------------------------------------
>
>                 Key: THRIFT-2775
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2775
>             Project: Thrift
>          Issue Type: Bug
>          Components: D - Library
>    Affects Versions: 0.9.2
>         Environment: openSUSE 13.1 (i586)  
> DMD Compiler v2.066.0 
> german locale
>            Reporter: Jens Geyer
>         Attachments: THRIFT-2775_ctfe_assert_fail.patch
>
>
> make check in d/lib fails with 
> {code}
> src/thrift/internal/ctfe.d(94): Error: static assert  (ctfeToString(3.1415) == "3.1415") is false
> {code}
> because ctfeToString(3.1415) evaluates to "3.14149999999999"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)