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

Issue 2388843002: Relaxes treatment of method type parameter in `as` expressions. (Closed)

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

Description

Relaxes treatment of method type parameter in `as` expressions. This CL changes the semantics of `dart2js --generic-method-syntax` generated code for `e as T` where `T` is a method type parameter. The old behavior was to raise a `TypeError` at runtime when such an expression was evaluated. The new behavior is to consider `T` as an alias for `dynamic`, i.e., `e as T` will then always succeed. Addresses part of issue 27460, omits a part that is not yet agreed upon. R=johnniwinther@google.com Committed: https://github.com/dart-lang/sdk/commit/b5d2b38aa3f3704e16ef33af7872188b1568a532

Patch Set 1 #

Patch Set 2 : Simplifies `o as T` check for `T` method type parameter. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -8 lines) Patch
M pkg/compiler/lib/src/diagnostics/messages.dart View 2 chunks +12 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/resolution/members.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/ssa/builder.dart View 1 2 chunks +7 lines, -4 lines 0 comments Download
M tests/language/generic_methods_type_expression_test.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/language/language.status View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
eernst
Sdk issue 27460 requests a new semantics for `e as T` where `T` is a ...
4 years, 2 months ago (2016-10-03 15:33:45 UTC) #2
Johnni Winther
lgtm
4 years, 2 months ago (2016-10-04 07:49:35 UTC) #3
eernst
4 years, 2 months ago (2016-10-18 09:11:59 UTC) #5
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
b5d2b38aa3f3704e16ef33af7872188b1568a532 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698