mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-28 09:33:27 +01:00
[svn r82] Fixed: Fall-through switch cases were broken.
This commit is contained in:
10
test/bug42.d
Normal file
10
test/bug42.d
Normal file
@@ -0,0 +1,10 @@
|
||||
module bug42;
|
||||
|
||||
void main() {
|
||||
int i = 2;
|
||||
switch (i) {
|
||||
case 0:
|
||||
case 1:
|
||||
default:
|
||||
}
|
||||
}
|
||||
16
test/bug43.d
Normal file
16
test/bug43.d
Normal file
@@ -0,0 +1,16 @@
|
||||
module bug43;
|
||||
|
||||
struct S
|
||||
{
|
||||
ubyte[3] vals;
|
||||
}
|
||||
|
||||
void func(ubyte[3] v)
|
||||
{
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
S s;
|
||||
func(s.vals);
|
||||
}
|
||||
22
test/union6.d
Normal file
22
test/union6.d
Normal file
@@ -0,0 +1,22 @@
|
||||
module union6;
|
||||
|
||||
pragma(LLVM_internal, "notypeinfo") {
|
||||
struct S
|
||||
{
|
||||
byte a;
|
||||
byte b;
|
||||
}
|
||||
union U
|
||||
{
|
||||
byte a;
|
||||
byte b;
|
||||
S c;
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
U u;
|
||||
auto a = u.c.b;
|
||||
//auto c = u.s.l;
|
||||
}
|
||||
Reference in New Issue
Block a user