Implement AstBuilder integration for parenthesized expressions.

The type inference engine doesn't even see parenthesized expressions
as a separate entity, since parentheses don't have any semantics.  So
we just copy the static type from the enclosed expression.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2982323003 .
This commit is contained in:
Paul Berry 2017-07-20 13:49:17 -07:00
parent 70933930cb
commit cc97126aed
2 changed files with 6 additions and 2 deletions

View file

@ -44,6 +44,12 @@ class ResolutionApplier extends GeneralizingAstVisitor {
node.staticType = _getTypeFor(node.methodName);
}
@override
void visitParenthesizedExpression(ParenthesizedExpression node) {
node.visitChildren(this);
node.staticType = node.expression.staticType;
}
@override
void visitVariableDeclaration(VariableDeclaration node) {
if (node.parent is VariableDeclarationList &&

View file

@ -47,7 +47,6 @@ inference/block_bodied_lambdas_returns: Crash
inference/block_bodied_lambdas_sync_star: Crash
inference/block_bodied_lambdas_void_context: Crash
inference/call_corner_cases: Crash
inference/coerce_bottom_and_null_types: Crash
inference/conditional_lub: Crash
inference/conditional_upwards_inference: Crash
inference/conflicts_can_happen2: Crash
@ -403,7 +402,6 @@ rasta/super_mixin: Crash
rasta/super_operator: Crash
rasta/supports_reflection: VerificationError
rasta/switch_execution_case_t02: Crash
rasta/switch_fall_through: Crash
rasta/this_invoke: Crash
rasta/try_label: Crash
rasta/type_literals: Crash