Chromium Code Reviews
DescriptionChanged warning to hint for `x as T` where T is a method type variable.
This CL changes `dart2js` for compilation with `--generic-method-syntax`.
The semantics of generic methods is such that `x as T` can be used even
when `T` is a formal type parameter of an enclosing function, but the
test will always succeed. This may induce bugs into otherwise correct
programs, because the test will succeed even in the case where a
complete implementation should fail.
In response to this situation `dart2js` used to emit a warning, but
this conflicts with certain build procedures which are not allowed to
have warnings, but are intended to be able to contain these "blindly
successful" `as` expressions. So this CL changes that warning to a
hint.
R=johnniwinther@google.com
Committed: https://github.com/dart-lang/sdk/commit/b05f160352cf451a15fd408ded1a9a4c0c6e657a
Patch Set 1 #
Messages
Total messages: 5 (2 generated)
|
|||||||||||||||||||