| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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:analyzer/src/summary/format.dart'; | 5 import 'package:analyzer/src/summary/format.dart'; |
| 6 import 'package:analyzer/src/summary/link.dart'; | 6 import 'package:analyzer/src/summary/link.dart'; |
| 7 import 'package:unittest/unittest.dart'; | 7 import 'package:unittest/unittest.dart'; |
| 8 | 8 |
| 9 import '../../reflective_tests.dart'; | 9 import '../../reflective_tests.dart'; |
| 10 import 'summarize_ast_test.dart'; | 10 import 'summarize_ast_test.dart'; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 } | 45 } |
| 46 class C<U> extends B<U> { | 46 class C<U> extends B<U> { |
| 47 var j; | 47 var j; |
| 48 } | 48 } |
| 49 '''); | 49 '''); |
| 50 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri); | 50 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri); |
| 51 library.libraryCycleForLink.ensureLinked(); | 51 library.libraryCycleForLink.ensureLinked(); |
| 52 // No assertions--just make sure it doesn't crash. | 52 // No assertions--just make sure it doesn't crash. |
| 53 } | 53 } |
| 54 | 54 |
| 55 void test_baseClass_genericWithField() { |
| 56 createLinker(''' |
| 57 class B<T> { |
| 58 int i = 0; |
| 59 } |
| 60 class C<T> extends B<T> { |
| 61 void f() {} |
| 62 } |
| 63 '''); |
| 64 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri); |
| 65 library.libraryCycleForLink.ensureLinked(); |
| 66 // No assertions--just make sure it doesn't crash. |
| 67 } |
| 68 |
| 55 void test_baseClass_genericWithGenericMethod() { | 69 void test_baseClass_genericWithGenericMethod() { |
| 56 createLinker(''' | 70 createLinker(''' |
| 57 class B<T> { | 71 class B<T> { |
| 58 List<U> f<U>(U u) => null; | 72 List<U> f<U>(U u) => null; |
| 59 } | 73 } |
| 60 class C<V> extends B<V> { | 74 class C<V> extends B<V> { |
| 61 var j; | 75 var j; |
| 62 } | 76 } |
| 63 '''); | 77 '''); |
| 64 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri); | 78 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri); |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 class C extends B with I {} | 480 class C extends B with I {} |
| 467 class D extends C { | 481 class D extends C { |
| 468 void f() {} | 482 void f() {} |
| 469 } | 483 } |
| 470 '''); | 484 '''); |
| 471 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri); | 485 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri); |
| 472 library.libraryCycleForLink.ensureLinked(); | 486 library.libraryCycleForLink.ensureLinked(); |
| 473 // No assertions--just make sure it doesn't crash. | 487 // No assertions--just make sure it doesn't crash. |
| 474 } | 488 } |
| 475 } | 489 } |
| OLD | NEW |