Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Issue 16292 - [REG2.069] bogus Error: goto skips declaration of v…
…ariable
- Loading branch information
1 parent
b0bc2f4
commit 0e9a52f
Showing
4 changed files
with
28 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,19 @@ | ||
/* PERMUTE_ARGS: | ||
*/ | ||
// https://issues.dlang.org/show_bug.cgi?id=16292 | ||
|
||
void main() | ||
{ | ||
goto label; | ||
if (makeS()[0]) | ||
{ | ||
label: | ||
} | ||
} | ||
|
||
S makeS() { return S(); } | ||
|
||
struct S | ||
{ | ||
int opIndex(size_t i) { return 0; } | ||
} |