www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 24228] New: Error: cannot implicitly convert expression

https://issues.dlang.org/show_bug.cgi?id=24228

          Issue ID: 24228
           Summary: Error: cannot implicitly convert expression
                    `_Complex(0.0, 1.0)` of type `_Complex!double` to
                    `idouble`
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: mingwu gmail.com

I'm continuing to build the s7.c

https://issues.dlang.org/show_bug.cgi?id=24187


with latest dmd

$ dmd --version
DMD64 D Compiler v2.106.0-beta.1


$ dmd s7.c
#defines(3415): Error: cannot implicitly convert expression `_Complex(0.0,
1.0)` of type `_Complex!double` to `idouble`


I cannot find the code which caused this problem (not on line 3415, BTW can dmd
produce better error line number?); since idouble is a DMD internal type, and
based on the error message, I think the error is obvious.

So the question: can we add implicitly convert expression `_Complex(0.0, 1.0)`
of type `_Complex!double` to `idouble`?

Otherwise, we won't be able to compile s7.c (third party library).

--
Nov 04 2023