DescriptionDon't allow function values in assert tests.
Currently you can write
assert(() { ... });
and the function will be called and the return value used as the assert test.
This feature isn't really worth its own complexity - if you want to get the same effect, you can just write all the function:
assert(() { ... }());
With asserts in const initializer lists, where the function call is not possible anyway, the feature went from being not very useful to being actual an complication and exception for users to remember.
R=eernst@google.com, rnystrom@google.com
Committed: https://github.com/dart-lang/sdk/commit/e329e1ce29247512987434fd9a75bc518416d7ed
Patch Set 1 #
Total comments: 7
Patch Set 2 : Merge to head, address comments. #
Total comments: 1
Patch Set 3 : Address comments #
Total comments: 1
Messages
Total messages: 11 (3 generated)
|