|
|
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
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
|
Total messages: 4 (1 generated)
|