| 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 23f3a13d4882092cdbe9fa865752b00fe7df9590..a2357c1f0e2f243468e1271137e1a70a9301ca25 100644
|
| --- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
|
| +++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
|
| @@ -2202,13 +2202,11 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
|
| Expression buildCompileTimeError(error, [int charOffset = -1]) {
|
| String message = new InputError(uri, charOffset, error).format();
|
| print(message);
|
| - // TODO(ahe): Use a method on TargetImplementation for looking up the
|
| - // constructor.
|
| - final Constructor constructor = coreTypes.getCoreClass(
|
| - "dart:core", "_CompileTimeError").constructors.first;
|
| - return new Throw(new ConstructorInvocation(
|
| - constructor,
|
| - new Arguments(<Expression>[new StringLiteral(message)])));
|
| + Builder constructor = library.loader.getCompileTimeError();
|
| + return new Throw(
|
| + buildStaticInvocation(constructor.target,
|
| + new Arguments(<Expression>[new StringLiteral(message)]),
|
| + isConst: false)); // TODO(ahe): Make this const.
|
| }
|
|
|
| Statement buildCompileTimeErrorStatement(error, [int charOffset = -1]) {
|
|
|