Skip to content

Commit

Permalink
Merge pull request #3971 from yebblies/issue1553d
Browse files Browse the repository at this point in the history
Issue 1553 - foreach_reverse is allowed for delegates
  • Loading branch information
AndrejMitrovic committed Sep 10, 2014
2 parents aad21a5 + 59dda4a commit 2fa5086
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -2204,7 +2204,7 @@ Statement *ForeachStatement::semantic(Scope *sc)
}
case Tdelegate:
if (op == TOKforeach_reverse)
warning("cannot use foreach_reverse with a delegate");
deprecation("cannot use foreach_reverse with a delegate");
Lapply:
{
Expression *ec;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// REQUIRED_ARGS: -w
// REQUIRED_ARGS: -de
// PERMUTE_ARGS:

/*
TEST_OUTPUT:
---
fail_compilation/warn1553.d(19): Warning: cannot use foreach_reverse with a delegate
fail_compilation/deprecate1553.d(19): Deprecation: cannot use foreach_reverse with a delegate
---
*/

Expand Down

0 comments on commit 2fa5086

Please sign in to comment.