Skip to content

Commit 5c9a554

Browse files
author
Kevin Millikin
committed
dart2js CPS: Evaluate the arguments to abstract class constructors.
Constructing an abstract class is a runtime error, but that error should be thrown after the arguments are evaluated. BUG= [email protected] Review URL: https://codereview.chromium.org/1506143002 .
1 parent c9a1e1c commit 5c9a554

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,6 +2155,7 @@ abstract class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
21552155
InterfaceType type,
21562156
ast.NodeList arguments,
21572157
CallStructure callStructure, _) {
2158+
for (ast.Node argument in arguments) visit(argument);
21582159
return buildAbstractClassInstantiationError(element.enclosingClass);
21592160
}
21602161

tests/co19/co19-dart2js.status

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9623,7 +9623,6 @@ WebPlatformTest/webstorage/storage_builtins_t01: RuntimeError # Please triage th
96239623
WebPlatformTest/webstorage/storage_local_setitem_quotaexceedederr_t01: Skip # Times out. Please triage this failure
96249624

96259625
[ $compiler == dart2js && $cps_ir ]
9626-
Language/Expressions/Instance_Creation/New/evaluation_t12: RuntimeError # Please triage this failure.
96279626
Language/Expressions/Method_Invocation/Super_Invocation/syntax_t01: RuntimeError # Cannot read property 'call' of undefined
96289627
Language/Expressions/Identifier_Reference/evaluation_variable_or_parameter_t03.dart: Crash # (i=0): For-loop variable captured in loop header
96299628
Language/Statements/For/syntax_t07: Crash # unsupported operation on erroneous element

0 commit comments

Comments
 (0)