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

Issue 2959763002: Add type inference for assert statements. (Closed)

Created:
3 years, 5 months ago by Paul Berry
Modified:
3 years, 5 months ago
CC:
reviews_dartlang.org, dart-fe-team+reviews_google.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add type inference for assert statements. Note that since the first argument of an assert statement may be either of type `bool` or `() -> bool`, and the second argument may be any object, no type context is passed down in downward inference; the only inference we need to do is to recursively invoke `inferExpression` to ensure that subexpressions are inferred properly. R=scheglov@google.com Committed: https://github.com/dart-lang/sdk/commit/5cd3c2c8dc64f5faa683c37be7a16fdd8a1cee29

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -1 line) Patch
M pkg/front_end/lib/src/fasta/kernel/body_builder.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart View 1 chunk +20 lines, -0 lines 0 comments Download
M pkg/front_end/lib/src/fasta/type_inference/type_inference_listener.dart View 1 chunk +6 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/assert.dart View 1 chunk +15 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/assert.dart.direct.expect View 1 chunk +11 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/assert.dart.outline.expect View 1 chunk +10 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/assert.dart.strong.expect View 1 chunk +11 lines, -0 lines 0 comments Download
M pkg/front_end/testcases/kompile.status View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
Paul Berry
I only need a review from one of you.
3 years, 5 months ago (2017-06-26 16:17:13 UTC) #2
scheglov
LGTM
3 years, 5 months ago (2017-06-26 16:19:14 UTC) #3
Paul Berry
3 years, 5 months ago (2017-06-26 17:05:14 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
5cd3c2c8dc64f5faa683c37be7a16fdd8a1cee29 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698