| 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 59578cedf592ed68c0ea720ce38745bfcbb6d7c6..f4e6794123bac9faa99e42767cb520261d869596 100644
|
| --- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
|
| +++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
|
| @@ -2041,18 +2041,19 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
|
| return new KernelConstructorInvocation(target, initialTarget, arguments,
|
| isConst: isConst)
|
| ..fileOffset = charOffset;
|
| - } else if (target is Procedure && target.kind == ProcedureKind.Factory) {
|
| - return new KernelFactoryConstructorInvocation(
|
| - target, initialTarget, arguments,
|
| - isConst: isConst)
|
| - ..fileOffset = charOffset;
|
| } else {
|
| - Procedure factory = target;
|
| - if (isConst && !factory.isConst) {
|
| + Procedure procedure = target;
|
| + if (isConst && !procedure.isConst) {
|
| return buildCompileTimeError("Not a const factory.", charOffset);
|
| + } else if (procedure.isFactory) {
|
| + return new KernelFactoryConstructorInvocation(
|
| + target, initialTarget, arguments,
|
| + isConst: isConst)
|
| + ..fileOffset = charOffset;
|
| + } else {
|
| + return new KernelStaticInvocation(target, arguments, isConst: isConst)
|
| + ..fileOffset = charOffset;
|
| }
|
| - return new KernelStaticInvocation(target, arguments, isConst: isConst)
|
| - ..fileOffset = charOffset;
|
| }
|
| }
|
|
|
|
|