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

Issue 184663004: Follow factory redirections when checking case expressions. (Closed)

Created:
6 years, 9 months ago by floitsch
Modified:
6 years, 9 months ago
Reviewers:
karlklose
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Follow factory redirections when checking case expressions. This version does the check in the resolver and uses the constant values and not just the types. As such, it also follows the constructor chain. R=karlklose@google.com Committed: https://code.google.com/p/dart/source/detail?r=33239

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 2

Patch Set 3 : It is a runtime-error. #

Patch Set 4 : Remove same-type switch-test from type-checker test. #

Patch Set 5 : Address comments. #

Patch Set 6 : Rebase #

Patch Set 7 : Remove same-type switch-test from type-checker test. #

Total comments: 10

Patch Set 8 : Update status file with issue number. #

Patch Set 9 : Addressed comments. #

Patch Set 10 : Address comments. (500) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -55 lines) Patch
M sdk/lib/_internal/compiler/implementation/resolution/members.dart View 1 2 3 4 5 6 7 8 2 chunks +89 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/typechecker.dart View 1 chunk +4 lines, -50 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/warnings.dart View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M tests/co19/co19-dart2js.status View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M tests/compiler/dart2js/resolver_test.dart View 1 2 3 4 5 6 7 8 2 chunks +20 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/type_checker_test.dart View 1 2 3 6 1 chunk +0 lines, -5 lines 0 comments Download
M tests/language/language.status View 1 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A tests/language/switch_case_test.dart View 1 2 1 chunk +46 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
floitsch
https://codereview.chromium.org/184663004/diff/20001/sdk/lib/_internal/compiler/implementation/resolution/members.dart File sdk/lib/_internal/compiler/implementation/resolution/members.dart (right): https://codereview.chromium.org/184663004/diff/20001/sdk/lib/_internal/compiler/implementation/resolution/members.dart#newcode3606 sdk/lib/_internal/compiler/implementation/resolution/members.dart:3606: addDeferredAction(enclosingElement, () { I need the constants to be ...
6 years, 9 months ago (2014-02-28 22:00:27 UTC) #1
floitsch
Had to update the type-checker test. The same-type checks are now done in the resolver, ...
6 years, 9 months ago (2014-03-03 09:57:43 UTC) #2
Johnni Winther
On 2014/02/28 22:00:27, floitsch wrote: > https://codereview.chromium.org/184663004/diff/20001/sdk/lib/_internal/compiler/implementation/resolution/members.dart > File sdk/lib/_internal/compiler/implementation/resolution/members.dart (right): > > https://codereview.chromium.org/184663004/diff/20001/sdk/lib/_internal/compiler/implementation/resolution/members.dart#newcode3606 > ...
6 years, 9 months ago (2014-03-03 10:01:57 UTC) #3
floitsch
Updated issue number.
6 years, 9 months ago (2014-03-03 10:36:19 UTC) #4
karlklose
LGTM. https://codereview.chromium.org/184663004/diff/100001/sdk/lib/_internal/compiler/implementation/resolution/members.dart File sdk/lib/_internal/compiler/implementation/resolution/members.dart (right): https://codereview.chromium.org/184663004/diff/100001/sdk/lib/_internal/compiler/implementation/resolution/members.dart#newcode3469 sdk/lib/_internal/compiler/implementation/resolution/members.dart:3469: if (constant.isInt()) return compiler.intClass.computeType(compiler); These should use `rawType` ...
6 years, 9 months ago (2014-03-03 10:38:05 UTC) #5
floitsch
PTAL at the resolver test. I will commit as is, but can change in a ...
6 years, 9 months ago (2014-03-03 18:47:15 UTC) #6
floitsch
6 years, 9 months ago (2014-03-03 19:22:24 UTC) #7
Message was sent while issue was closed.
Committed patchset #10 manually as r33239 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698