[Issue 7979] New: Alias this does not work with switch
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Apr 24 09:53:08 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7979
Summary: Alias this does not work with switch
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: robert at octarineparrot.com
--- Comment #0 from Robert Clipsham <robert at octarineparrot.com> 2012-04-24 17:54:09 BST ---
struct A {
int a;
alias a this;
}
void main() {
A t;
switch(t) {
default:
}
}
With dmd 2.059 this results in:
test.d(7): Error: 't' is not of integral type, it is a A
I believe the alias this should allow this to work.
--
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