[Issue 14249] New: Loose error check for incorrect template mixin
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Mar 5 05:48:13 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14249
Issue ID: 14249
Summary: Loose error check for incorrect template mixin
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: k.hara.pg at gmail.com
Following code should fail to compile, but doesn't.
mixin template Mix()
{
// shared static this() {}
shared static ~this() {}
// static this() {}'func.c'
static ~this() {}
unittest {}
// invariant {}
// alias a this;
// new(size_t sz) { return null; }
// delete(void* p) { }
// this(int) {}
// this(this) {}
// ~this() {}
// union { int x; double y; }
}
void main()
{
mixin Mix!();
}
--
More information about the Digitalmars-d-bugs
mailing list