[Issue 18736] New: constructor calls allowed after case labels
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 6 03:36:47 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18736
Issue ID: 18736
Summary: constructor calls allowed after case labels
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: bugzilla at digitalmars.com
Delegating constructor calls are not allowed after labels, but case labels and
default labels should also count as labels.
class A
{
this(char c) { }
this(int i)
{
switch (i)
{
case 1: break;
default: break;
}
this('c'); // should give error
}
}
--
More information about the Digitalmars-d-bugs
mailing list