| Index: sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
|
| index cea45c9df7c59fa73b4f8a1faeacc8c51d9fe3b5..509755f009f588bddcba1901b740e019cc1b2fe1 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
|
| @@ -49,6 +49,7 @@ class CodeEmitterTask extends CompilerTask {
|
| Set<ClassElement> instantiatedClasses;
|
|
|
| JavaScriptBackend get backend => compiler.backend;
|
| + TypeVariableHandler get typeVariableHandler => backend.typeVariableHandler;
|
|
|
| String get _ => space;
|
| String get space => compiler.enableMinification ? "" : " ";
|
| @@ -1621,9 +1622,14 @@ class CodeEmitterTask extends CompilerTask {
|
| }
|
|
|
| int reifyType(DartType type) {
|
| - // TODO(ahe): Handle type variables correctly instead of using "#".
|
| - String representation = backend.rti.getTypeRepresentation(type, (_) {});
|
| - return addGlobalMetadata(representation.replaceAll('#', 'null'));
|
| + jsAst.Expression representation =
|
| + backend.rti.getTypeRepresentation(type, (variable) {
|
| + return js.toExpression(
|
| + typeVariableHandler.reifyTypeVariable(variable.element));
|
| + });
|
| +
|
| + return addGlobalMetadata(
|
| + jsAst.prettyPrint(representation, compiler).getText());
|
| }
|
|
|
| int reifyName(SourceString name) {
|
|
|