[Issue 596] New: Support array, arrayliteral and struct in switch and case
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Nov 25 06:41:19 PST 2006
http://d.puremagic.com/issues/show_bug.cgi?id=596
Summary: Support array, arrayliteral and struct in switch and
case
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: lovesyao at hotmail.com
struct Test{
int x;
int y;
int z;
}
void main(){
Test* t = new Test;
const static Test c1 = {0,0,0};
switch(*t){
case c1://struct
break;
default:
assert(0);
}
ubyte[] t2 = [0,1,2];
switch(t2){
case [0,1,2]://arrayliteral
break;
default:
}
}
--
More information about the Digitalmars-d-bugs
mailing list