Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Issue 17807 - Spurious dead code warnings on enum and static vari…
…ables.
- Loading branch information
Showing
4 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// REQUIRED_ARGS: -o- -w | ||
|
||
int bug17807(){ | ||
int y=0; | ||
Lswitch: switch(2){ | ||
{ case 0: break; } | ||
enum x=0; | ||
struct S{ enum x=0; } | ||
int foo(){ | ||
return 0; | ||
} | ||
default: y=x+S.x+foo(); | ||
static foreach(i;1..5) | ||
case i: break Lswitch; | ||
} | ||
return y; | ||
} |