Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4110 from yebblies/issue13679
Issue 13679 - foreach_reverse is allowed for AAs
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// REQUIRED_ARGS: -w | ||
// PERMUTE_ARGS: | ||
|
||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/warn13679.d(14): Warning: cannot use foreach_reverse with an associative array | ||
--- | ||
*/ | ||
|
||
void main() | ||
{ | ||
int[int] aa; | ||
foreach_reverse(k, v; aa) {} | ||
} |