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

          Issue ID: 20477
           Summary: incorrect error: cannot implicitly convert expression
                    of type int to dchar
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

```
void main() {
    static assert(is(int:dchar));
    int a = 1114112;
    dchar b = a;
    dchar c = 1114112;
}
```

On variable c it says Error: cannot implicitly convert expression 1114112 of
type int to dchar. The value is above `dchar.max`, but since `is(int:dchar)`
the error "cannot implicitly convert" is false.

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

--

Reply via email to