| 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 1a754fd18f29628daabe4c52d8651e26dd3bbd0d..a080201e714e5f71a43f8f8bd303def5067de4a2 100644
|
| --- a/pkg/compiler/lib/src/ssa/builder.dart
|
| +++ b/pkg/compiler/lib/src/ssa/builder.dart
|
| @@ -2594,6 +2594,10 @@ class SsaBuilder extends ast.Visitor
|
| HInstruction buildTypeConversion(
|
| HInstruction original, DartType type, int kind) {
|
| if (type == null) return original;
|
| + // GENERIC_METHODS: The following statement was added for parsing and
|
| + // ignoring method type variables; must be generalized for full support of
|
| + // generic methods.
|
| + type = type.eraseMethodTypeVariableType;
|
| type = type.unaliased;
|
| assert(assertTypeInContext(type, original));
|
| if (type.isInterfaceType && !type.treatAsRaw) {
|
| @@ -4772,6 +4776,17 @@ class SsaBuilder extends ast.Visitor
|
| // The type variable is stored on the object.
|
| return readTypeVariable(member.enclosingClass, type.element,
|
| sourceInformation: sourceInformation);
|
| + } else if (type is MethodTypeVariableType) {
|
| + // GENERIC_METHODS: The enclosing `else if` was added to provide minimal
|
| + // support for generic methods: The method type arguments are always
|
| + // pretending to have the value `dynamic`. Revise for full support.
|
| + DynamicType type = const DynamicType();
|
| + JavaScriptBackend backend = compiler.backend;
|
| + ClassElement cls = backend.helpers.DynamicRuntimeType;
|
| + HInstruction instruction =
|
| + new HDynamicType(type, new TypeMask.exact(cls, compiler.world));
|
| + add(instruction);
|
| + return instruction;
|
| } else {
|
| reporter.internalError(
|
| type.element, 'Unexpected type variable in static context.');
|
|
|