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

Issue 2001093006: Changes dart2js to warn at reified usage of method type variables. (Closed)

Created:
4 years, 7 months ago by eernst
Modified:
4 years, 7 months ago
Reviewers:
Johnni Winther
CC:
reviews_dartlang.org, floitsch
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Changes dart2js to warn at reified usage of method type variables. This CL changes the response to `x is T`, `x is! T`, `x as T`, and `T` used as a type expression (say, `foo(T)`) where `T` is a method type variable: It will now emit a warning in these cases. Test examples associated with `TYPE_VARIABLE_FROM_METHOD_NOT_REIFIED` have been activated and corrected, such that this behavior is tested. As a result 'language/generic_methods_type_expression_test.dart' will now cause warnings when compiled with `dart2js`. Note that this does not break any tests, because `dart2js` does not make the compilation fail when there is a warning (also, the analyzer and the vm are unaffected because this is about a change to `dart2js`, not a change to the test file). R=johnniwinther@google.com Committed: https://github.com/dart-lang/sdk/commit/acc5f59a99d5d8747459c935e6360ac325606cc6

Patch Set 1 #

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

Messages

Total messages: 5 (2 generated)
eernst
Implements warnings for cases where the reified usage of a method type variable is guaranteed ...
4 years, 7 months ago (2016-05-24 14:50:26 UTC) #2
Johnni Winther
lgtm
4 years, 7 months ago (2016-05-25 07:35:50 UTC) #3
eernst
4 years, 7 months ago (2016-05-25 08:47:01 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
acc5f59a99d5d8747459c935e6360ac325606cc6 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698