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

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 1492823007: Fix #25111: evaluate arguments before throwing errors about invoking invalid constructors (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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-dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index e1a9d20ef94853ce1e9cf681df424da5785ed68f..540ba50ecb788da3fa36a95bf0376e7cd6538f04 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -5141,6 +5141,12 @@ class SsaBuilder extends ast.Visitor
// mismatch.
ClassElement cls = constructor.enclosingClass;
if (cls.isAbstract && constructor.isGenerativeConstructor) {
+ // However, we need to ensure that all arguments are evaluated before we
+ // throw the ACIE exception.
+ send.arguments.forEach((arg) {
+ visit(arg);
+ pop();
+ });
generateAbstractClassInstantiationError(send, cls.name);
return;
}
« no previous file with comments | « no previous file | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698