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

Issue 2801683004: Reify implicit casts for FutureOr (Closed)

Created:
3 years, 8 months ago by vsm
Modified:
3 years, 8 months ago
Reviewers:
Leaf
CC:
dev-compiler+reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Reify implicit casts for FutureOr Before landing, two issues to resolve: (1) We appear to allow sideways casts now without static error - e.g., List<Object> -> FutureOr<List<String>> Is that intended? If so, it breaks an assumption that implicit casts are from supertype to subtype. (2) LUB and FutureOr It appears that the LUB of, e.g., String and Future<String> is Object. See fixes in tests to record casts back to FutureOr. Fixes #29251 R=leafp@google.com Committed: https://github.com/dart-lang/sdk/commit/bc3089838cd3fb1e3e84dacd2807b0cc89682d78

Patch Set 1 #

Total comments: 7

Patch Set 2 : Format #

Patch Set 3 : Add back FutureOr case #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -33 lines) Patch
M pkg/analyzer/lib/src/task/strong/checker.dart View 1 2 5 chunks +19 lines, -18 lines 0 comments Download
M pkg/analyzer/test/src/task/strong/checker_test.dart View 1 2 3 chunks +16 lines, -7 lines 0 comments Download
M pkg/analyzer/test/src/task/strong/inferred_type_test.dart View 1 2 4 chunks +8 lines, -8 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
vsm
https://codereview.chromium.org/2801683004/diff/1/pkg/analyzer/test/src/task/strong/checker_test.dart File pkg/analyzer/test/src/task/strong/checker_test.dart (right): https://codereview.chromium.org/2801683004/diff/1/pkg/analyzer/test/src/task/strong/checker_test.dart#newcode958 pkg/analyzer/test/src/task/strong/checker_test.dart:958: return (/*info:DOWN_CAST_COMPOSITE*/(1 > 0) ? new Future<String>.value('hello') : "world"); ...
3 years, 8 months ago (2017-04-05 15:52:59 UTC) #1
Leaf
https://codereview.chromium.org/2801683004/diff/1/pkg/analyzer/lib/src/task/strong/checker.dart File pkg/analyzer/lib/src/task/strong/checker.dart (right): https://codereview.chromium.org/2801683004/diff/1/pkg/analyzer/lib/src/task/strong/checker.dart#newcode940 pkg/analyzer/lib/src/task/strong/checker.dart:940: // Unwrap FutureOr union to check for a cast. ...
3 years, 8 months ago (2017-04-05 20:47:27 UTC) #3
vsm
PTAL https://codereview.chromium.org/2801683004/diff/1/pkg/analyzer/lib/src/task/strong/checker.dart File pkg/analyzer/lib/src/task/strong/checker.dart (right): https://codereview.chromium.org/2801683004/diff/1/pkg/analyzer/lib/src/task/strong/checker.dart#newcode940 pkg/analyzer/lib/src/task/strong/checker.dart:940: // Unwrap FutureOr union to check for a ...
3 years, 8 months ago (2017-04-07 22:23:08 UTC) #4
vsm
On 2017/04/07 22:23:08, vsm wrote: > PTAL > > https://codereview.chromium.org/2801683004/diff/1/pkg/analyzer/lib/src/task/strong/checker.dart > File pkg/analyzer/lib/src/task/strong/checker.dart (right): > ...
3 years, 8 months ago (2017-04-07 22:31:46 UTC) #5
vsm
On 2017/04/07 22:31:46, vsm wrote: > On 2017/04/07 22:23:08, vsm wrote: > > PTAL > ...
3 years, 8 months ago (2017-04-07 22:52:31 UTC) #6
Leaf
lgtm
3 years, 8 months ago (2017-04-07 23:11:57 UTC) #7
vsm
3 years, 8 months ago (2017-04-08 00:33:45 UTC) #9
Message was sent while issue was closed.
Committed patchset #3 (id:20001) manually as
bc3089838cd3fb1e3e84dacd2807b0cc89682d78 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698