Chromium Code Reviews| 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 50db1bf00553b3735936d472965f8e9013c595b7..222d7e37d9088db81950a9b7a7420a4bb4d8c7e5 100644 |
| --- a/pkg/compiler/lib/src/ssa/builder.dart |
| +++ b/pkg/compiler/lib/src/ssa/builder.dart |
| @@ -4766,6 +4766,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) { |
|
Johnni Winther
2016/05/11 12:58:30
I think this should be the first test, so that we
|
| + // TODO(eernst): 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.'); |