Skip to content

Commit

Permalink
Merge pull request #4623 from andralex/fix-array-to-bool-warning
Browse files Browse the repository at this point in the history
Revert "Fix Issue 4733 - Possible bugs caused by dynamic arrays in boole...
  • Loading branch information
WalterBright committed May 2, 2015
2 parents 568f093 + 72e8bfd commit ef0bb27
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 33 deletions.
5 changes: 0 additions & 5 deletions src/expression.c
Expand Up @@ -2768,11 +2768,6 @@ Expression *Expression::toBoolean(Scope *sc)
error("expression %s of type %s does not have a boolean value", toChars(), t->toChars());
return new ErrorExp();
}

if (tb->ty == Tarray)
warning("implicit conversion of dynamic arrays to bool can be ambiguous and will be deprecated. Use one of: %s !is null, %s.length, or %s.ptr instead",
toChars(), toChars(), toChars());

return e;
}

Expand Down
28 changes: 0 additions & 28 deletions test/fail_compilation/warn4733.d

This file was deleted.

0 comments on commit ef0bb27

Please sign in to comment.