Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Issue 2473743002: Changed warning to hint for `x as T` where T is a method type variable. (Closed)

Created:
4 years, 1 month ago by eernst
Modified:
4 years, 1 month ago
Reviewers:
Johnni Winther
CC:
reviews_dartlang.org, floitsch
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Changed 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -3 lines) Patch
M pkg/compiler/lib/src/resolution/members.dart View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
eernst
One more adjustment of the treatment of `as` with method type parameters.
4 years, 1 month ago (2016-11-02 14:16:25 UTC) #2
Johnni Winther
lgtm
4 years, 1 month ago (2016-11-02 14:22:33 UTC) #3
eernst
4 years, 1 month ago (2016-11-02 15:56:21 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
b05f160352cf451a15fd408ded1a9a4c0c6e657a (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698