https://issues.dlang.org/show_bug.cgi?id=14677
Issue ID: 14677
Summary: cast correctness not checked inside is(typeof())
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
```
void main()
{
void* x;
// Error: e2ir: cannot cast x of type void* to type int[30]
auto y = cast (int[30]) x;
// But this passes
static assert (is(typeof({ auto y = cast(int[30])x; })));
}
```
Looks like correctness of cast is checked after normal semantic phase and thus
ignored by `is(typeof())`
--