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

Issue 1059763003: Inference casts to dynamic, fuzzy types handled (Closed)

Created:
5 years, 8 months ago by Leaf
Modified:
5 years, 8 months ago
Reviewers:
vsm
CC:
dev-compiler+reviews_dartlang.org
Base URL:
git@github.com:dart-lang/dart-dev-compiler.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Inference casts to dynamic, fuzzy types handled During inference, allow sub-expressions of type dynamic to be cast to the inferred type. This CL also adds special case support for the case where we are trying to infer a type for a closure literal with a fuzzy type - often these closures are already well-typed (or easily inferable) if we eliminate the fuzziness. This gets rid of two of the static errors on angular hello world, along with most of the InferableClosure warnings (turning them into InferredTypeClosure infos). Most of the remaining InferableClosure cases are function literals with block function bodies, which I don't handle in general yet. BUG= R=vsm@google.com Committed: https://github.com/dart-lang/dev_compiler/commit/34dc80aa9118c6fd2c1cd468bac09a2ab466c54b

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -195 lines) Patch
M lib/runtime/dart/_js_helper.js View 1 chunk +1 line, -1 line 0 comments Download
M lib/src/checker/rules.dart View 10 chunks +64 lines, -29 lines 1 comment Download
M lib/src/codegen/reify_coercions.dart View 2 chunks +15 lines, -0 lines 0 comments Download
M test/checker/checker_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M test/checker/inferred_type_test.dart View 1 chunk +6 lines, -5 lines 2 comments Download
M test/dart_codegen/expect/async/stream.dart View 19 chunks +36 lines, -44 lines 0 comments Download
M test/dart_codegen/expect/async/stream_controller.dart View 3 chunks +5 lines, -5 lines 0 comments Download
M test/dart_codegen/expect/async/stream_impl.dart View 4 chunks +12 lines, -12 lines 0 comments Download
M test/dart_codegen/expect/async/stream_pipe.dart View 1 chunk +1 line, -1 line 0 comments Download
M test/dart_codegen/expect/async/stream_transformers.dart View 3 chunks +17 lines, -17 lines 0 comments Download
M test/dart_codegen/expect/async/timer.dart View 2 chunks +3 lines, -3 lines 0 comments Download
M test/dart_codegen/expect/async/zone.dart View 11 chunks +35 lines, -35 lines 0 comments Download
M test/dart_codegen/expect/convert/json.dart View 2 chunks +2 lines, -4 lines 0 comments Download
M test/dart_codegen/expect/convert/string_conversion.dart View 1 chunk +3 lines, -3 lines 0 comments Download
M test/dart_codegen/expect/convert/utf.dart View 2 chunks +4 lines, -4 lines 0 comments Download
M test/dart_codegen/expect/core/uri.dart View 16 chunks +24 lines, -31 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
Leaf
https://codereview.chromium.org/1059763003/diff/1/test/checker/inferred_type_test.dart File test/checker/inferred_type_test.dart (right): https://codereview.chromium.org/1059763003/diff/1/test/checker/inferred_type_test.dart#newcode1503 test/checker/inferred_type_test.dart:1503: Function2<int, int> l1 = /*info:InferredTypeClosure*/(x) => x+1; This now ...
5 years, 8 months ago (2015-04-03 22:23:23 UTC) #2
vsm
lgtm https://codereview.chromium.org/1059763003/diff/1/lib/src/checker/rules.dart File lib/src/checker/rules.dart (right): https://codereview.chromium.org/1059763003/diff/1/lib/src/checker/rules.dart#newcode774 lib/src/checker/rules.dart:774: // succeed and treat it as a succesful ...
5 years, 8 months ago (2015-04-03 22:32:59 UTC) #3
Leaf
5 years, 8 months ago (2015-04-03 22:36:31 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
34dc80aa9118c6fd2c1cd468bac09a2ab466c54b (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698