[Issue 20959] New: Indexing a pointer of a fwd-declared struct type is NOT a frontend error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jun 19 17:11:06 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20959
Issue ID: 20959
Summary: Indexing a pointer of a fwd-declared struct type is
NOT a frontend error
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: kinke at gmx.net
struct S;
ref foo(S* s)
{
static assert(__traits(compiles, s[1])); // should fail
return s[1]; // ICE for LDC, for DMD: Error: struct `onlineapp.S` unknown
size
}
--
More information about the Digitalmars-d-bugs
mailing list