| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 import 'dart:async'; | 6 import 'dart:async'; |
| 7 import "package:async_helper/async_helper.dart"; | 7 import "package:async_helper/async_helper.dart"; |
| 8 import '../mock_compiler.dart'; | 8 import '../mock_compiler.dart'; |
| 9 import '../mock_libraries.dart'; | 9 import '../mock_libraries.dart'; |
| 10 import 'package:compiler/compiler.dart'; | 10 import 'package:compiler/compiler.dart'; |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 } | 207 } |
| 208 class A { | 208 class A { |
| 209 static const String a = "5"; | 209 static const String a = "5"; |
| 210 static const String b = "4"; | 210 static const String b = "4"; |
| 211 } | 211 } |
| 212 '''); | 212 '''); |
| 213 // Class member of typedef-ed function type. | 213 // Class member of typedef-ed function type. |
| 214 // Maybe typedef should be included in the result too, but it | 214 // Maybe typedef should be included in the result too, but it |
| 215 // works fine without it. | 215 // works fine without it. |
| 216 testDart2Dart(''' | 216 testDart2Dart(''' |
| 217 typedef void foofunc(arg); | 217 typedef void foofunc(_0); |
| 218 main() { | 218 main() { |
| 219 new A((arg) {}); | 219 new A((arg) {}); |
| 220 } | 220 } |
| 221 class A { | 221 class A { |
| 222 A(foofunc this.handler); | 222 A(foofunc this.handler); |
| 223 final foofunc handler; | 223 final foofunc handler; |
| 224 } | 224 } |
| 225 '''); | 225 '''); |
| 226 } | 226 } |
| 227 | 227 |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 MyFunction myf1; | 662 MyFunction myf1; |
| 663 mylib.MyFunction myf2; | 663 mylib.MyFunction myf2; |
| 664 new A<int>().f; | 664 new A<int>().f; |
| 665 new T(); | 665 new T(); |
| 666 | 666 |
| 667 new mylib.A<int>().f; | 667 new mylib.A<int>().f; |
| 668 new mylib.T(); | 668 new mylib.T(); |
| 669 } | 669 } |
| 670 '''; | 670 '''; |
| 671 var expectedResult = ''' | 671 var expectedResult = ''' |
| 672 typedef void MyFunction<T_B extends num>(T_B arg); | 672 typedef void MyFunction<T_B extends num>(T_B _0); |
| 673 class T {} | 673 class T {} |
| 674 class B<T_B> {} | 674 class B<T_B> {} |
| 675 class A<T_B> extends B<T_B> { | 675 class A<T_B> extends B<T_B> { |
| 676 T_B f; | 676 T_B f; |
| 677 } | 677 } |
| 678 typedef void MyFunction_A<T_B extends num>(T_B arg); | 678 typedef void MyFunction_A<T_B extends num>(T_B _0); |
| 679 class T_A {} | 679 class T_A {} |
| 680 class B_A<T_B> {} | 680 class B_A<T_B> {} |
| 681 class A_A<T_B> extends B_A<T_B> { | 681 class A_A<T_B> extends B_A<T_B> { |
| 682 T_B f; | 682 T_B f; |
| 683 } | 683 } |
| 684 main() { | 684 main() { |
| 685 MyFunction_A myf1; | 685 MyFunction_A myf1; |
| 686 MyFunction myf2; | 686 MyFunction myf2; |
| 687 new A_A<int>().f; | 687 new A_A<int>().f; |
| 688 new T_A(); | 688 new T_A(); |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1100 testParametersMinified(); | 1100 testParametersMinified(); |
| 1101 testDeclarationTypePlaceholders(); | 1101 testDeclarationTypePlaceholders(); |
| 1102 testPlatformLibraryMemberNamesAreFixed(); | 1102 testPlatformLibraryMemberNamesAreFixed(); |
| 1103 testConflictsWithCoreLib(); | 1103 testConflictsWithCoreLib(); |
| 1104 testUnresolvedNamedConstructor1(); | 1104 testUnresolvedNamedConstructor1(); |
| 1105 testUnresolvedNamedConstructor2(); | 1105 testUnresolvedNamedConstructor2(); |
| 1106 testUnresolvedNamedConstructor3(); | 1106 testUnresolvedNamedConstructor3(); |
| 1107 testClassAndNamedMixinDeclarations(); | 1107 testClassAndNamedMixinDeclarations(); |
| 1108 } | 1108 } |
| 1109 | 1109 |
| OLD | NEW |