| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library type_test_helper; | 5 library type_test_helper; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'package:expect/expect.dart'; | 8 import 'package:expect/expect.dart'; |
| 9 import 'compiler_helper.dart' as mock; | 9 import 'compiler_helper.dart' as mock; |
| 10 import 'memory_compiler.dart' as memory; | 10 import 'memory_compiler.dart' as memory; |
| 11 import 'package:compiler/src/dart_types.dart'; | 11 import 'package:compiler/src/dart_types.dart'; |
| 12 import 'package:compiler/src/dart2jslib.dart' | 12 import 'package:compiler/src/compiler.dart' |
| 13 show Compiler; | 13 show Compiler; |
| 14 import 'package:compiler/src/elements/elements.dart' | 14 import 'package:compiler/src/elements/elements.dart' |
| 15 show Element, | 15 show Element, |
| 16 TypeDeclarationElement, | 16 TypeDeclarationElement, |
| 17 ClassElement; | 17 ClassElement; |
| 18 | 18 |
| 19 GenericType instantiate(TypeDeclarationElement element, | 19 GenericType instantiate(TypeDeclarationElement element, |
| 20 List<DartType> arguments) { | 20 List<DartType> arguments) { |
| 21 if (element.isClass) { | 21 if (element.isClass) { |
| 22 return new InterfaceType(element, arguments); | 22 return new InterfaceType(element, arguments); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 namedParameters.forEach((String name, DartType type) { | 140 namedParameters.forEach((String name, DartType type) { |
| 141 namedParameterNames.add(name); | 141 namedParameterNames.add(name); |
| 142 namedParameterTypes.add(type); | 142 namedParameterTypes.add(type); |
| 143 }); | 143 }); |
| 144 } | 144 } |
| 145 return new FunctionType.synthesized( | 145 return new FunctionType.synthesized( |
| 146 returnType, parameters, optionalParameters, | 146 returnType, parameters, optionalParameters, |
| 147 namedParameterNames, namedParameterTypes); | 147 namedParameterNames, namedParameterTypes); |
| 148 } | 148 } |
| 149 } | 149 } |
| OLD | NEW |