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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Issue 2995553002: Implement type inference for asserts in constructor initializers. (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/kernel/body_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 97483bd4a289d0e23fc01def48e5b4d871a33ef9..3b300a18aff017cebb6192c3942c3f658345e0ef 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -2763,14 +2763,15 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
// So we produce an initializer like this:
//
// var #t0 = (() { statement; }) ()
- return new LocalInitializer(new VariableDeclaration.forValue(
- buildMethodInvocation(
+ return new KernelAssertInitializer(
+ new VariableDeclaration.forValue(buildMethodInvocation(
new FunctionExpression(new FunctionNode(statement)),
callName,
new Arguments.empty(),
statement.fileOffset,
isConstantExpression: true,
- isImplicitCall: true)));
+ isImplicitCall: true)),
+ statement);
}
@override

Powered by Google App Engine
This is Rietveld 408576698