[Issue 10120] New: @disable this(); and switch statement
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun May 19 12:25:06 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10120
Summary: @disable this(); and switch statement
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: maxim at maxim-fomin.ru
--- Comment #0 from Maxim Fomin <maxim at maxim-fomin.ru> 2013-05-19 12:25:05 PDT ---
struct S
{
int a;
@disable this();
this(int) { a = 1; }
~this() { assert(a !is 0); }
alias a this;
int opCall() { return a; }
}
void main()
{
switch (S.init())
{
case 0:
assert(0); //oops
default:
}
}
Maybe in the first order this is 'calling member function on type' problem.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list