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

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

Issue 2730763002: Recover from missing arguments in new expression. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | tests/co19/co19-kernel.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a06884ee7e279942d48cc930de0ac85fbff6a4ca..e906a1903e792d17c02003c4e04c78c0ae048636 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -1652,6 +1652,11 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
List<DartType> typeArguments = pop();
var type = pop();
+ if (arguments == null) {
+ push(buildCompileTimeError("No arguments.", token.charOffset));
+ return;
+ }
+
if (typeArguments != null) {
assert(arguments.types.isEmpty);
arguments.types.addAll(typeArguments);
« no previous file with comments | « no previous file | tests/co19/co19-kernel.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698