|
|
Add local type inference logic for integer literals.
This CL introduces Fasta's first type inference rule, and hooks it up
to all the necessary testing infrastructure. The rule is that a local
variable whose initializer is an integer literal should have an
inferred type of int.
Only variables occurring at top level within a method are inferred (we
don't yet recurse inside sub-blocks).
Additional type inference rules will be added in follow-up CLs.
R=ahe@google.com
Committed: https://github.com/dart-lang/sdk/commit/e8e8359cdf7039b562ea8c4541625f93db763a0e
Total comments: 4
Total comments: 7
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+129 lines, -41 lines) |
Patch |
 |
M |
pkg/front_end/lib/src/fasta/builder/ast_factory.dart
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
pkg/front_end/lib/src/fasta/kernel/body_builder.dart
|
View
|
1
2
|
9 chunks |
+20 lines, -16 lines |
0 comments
|
Download
|
 |
M |
pkg/front_end/lib/src/fasta/kernel/kernel_ast_factory.dart
|
View
|
|
2 chunks |
+4 lines, -2 lines |
3 comments
|
Download
|
 |
M |
pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
|
View
|
|
3 chunks |
+15 lines, -8 lines |
0 comments
|
Download
|
 |
M |
pkg/front_end/lib/src/fasta/source/diet_listener.dart
|
View
|
|
2 chunks |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
pkg/front_end/lib/src/fasta/source/source_loader.dart
|
View
|
1
2
|
4 chunks |
+10 lines, -5 lines |
0 comments
|
Download
|
 |
M |
pkg/front_end/lib/src/fasta/testing/kernel_chain.dart
|
View
|
|
1 chunk |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
pkg/front_end/lib/src/fasta/testing/suite.dart
|
View
|
1
2
|
1 chunk |
+8 lines, -5 lines |
0 comments
|
Download
|
 |
M |
pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
|
View
|
1
|
1 chunk |
+27 lines, -0 lines |
0 comments
|
Download
|
 |
A |
pkg/front_end/testcases/inference/int_upwards_local.dart
|
View
|
1
2
3
|
1 chunk |
+8 lines, -0 lines |
2 comments
|
Download
|
 |
A |
pkg/front_end/testcases/inference/int_upwards_local.dart.dartk.expect
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
A |
pkg/front_end/testcases/inference/int_upwards_local.dart.direct.expect
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
A |
pkg/front_end/testcases/inference/int_upwards_local.dart.outline.expect
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
A |
pkg/front_end/testcases/inference/int_upwards_local.dart.strong.expect
|
View
|
|
1 chunk |
+7 lines, -0 lines |
2 comments
|
Download
|
 |
M |
pkg/kernel/test/closures/suite.dart
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 9 (2 generated)
|