| Index: pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
|
| index dd756c69567adf7090c5dd40509a9834040a7efa..3e1f9bf0d1edc78bc3dfa25d60f1b2fb22941e1c 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
|
| @@ -2734,10 +2734,18 @@ class IrBuilder {
|
| type = program.unaliasType(type);
|
|
|
| if (type.isMalformed) {
|
| - ErroneousElement element = type.element;
|
| - ir.Primitive message = buildStringConstant(element.message);
|
| + String message;
|
| + if (type is MalformedType) {
|
| + ErroneousElement element = type.element;
|
| + message = element.message;
|
| + } else {
|
| + assert(type is MethodTypeVariableType);
|
| + message = "Method type variables are not reified, "
|
| + "so they cannot be tested dynamically";
|
| + }
|
| + ir.Primitive irMessage = buildStringConstant(message);
|
| return buildStaticFunctionInvocation(program.throwTypeErrorHelper,
|
| - <ir.Primitive>[message], sourceInformation);
|
| + <ir.Primitive>[irMessage], sourceInformation);
|
| }
|
|
|
| List<ir.Primitive> typeArguments = const <ir.Primitive>[];
|
|
|