OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 // TODO(jmesserly): this file needs to be refactored, it's a port from | 5 // TODO(jmesserly): this file needs to be refactored, it's a port from |
6 // package:dev_compiler's tests | 6 // package:dev_compiler's tests |
7 /// Tests for type inference. | 7 /// Tests for type inference. |
8 library analyzer.test.src.task.strong.inferred_type_test; | 8 library analyzer.test.src.task.strong.inferred_type_test; |
9 | 9 |
10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 checkFile(r''' | 637 checkFile(r''' |
638 class A {} | 638 class A {} |
639 class B extends A {} | 639 class B extends A {} |
640 class Foo<T extends A> {} | 640 class Foo<T extends A> {} |
641 void main() { | 641 void main() { |
642 Foo<B> foo = /*info:INFERRED_TYPE_ALLOCATION*/new Foo(); | 642 Foo<B> foo = /*info:INFERRED_TYPE_ALLOCATION*/new Foo(); |
643 } | 643 } |
644 '''); | 644 '''); |
645 } | 645 } |
646 | 646 |
647 @failingTest | |
648 void test_constructors_inferenceFBounded() { | 647 void test_constructors_inferenceFBounded() { |
649 // Regression for https://github.com/dart-lang/sdk/issues/26990 | 648 // Regression for https://github.com/dart-lang/sdk/issues/26990 |
650 var unit = checkFile(''' | 649 var unit = checkFile(''' |
651 class Clonable<T> {} | 650 class Clonable<T> {} |
652 | 651 |
653 class Pair<T extends Clonable<T>, U extends Clonable<U>> { | 652 class Pair<T extends Clonable<T>, U extends Clonable<U>> { |
654 T t; | 653 T t; |
655 U u; | 654 U u; |
656 Pair(this.t, this.u); | 655 Pair(this.t, this.u); |
657 Pair._(); | 656 Pair._(); |
(...skipping 4740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5398 } | 5397 } |
5399 | 5398 |
5400 void setUp() { | 5399 void setUp() { |
5401 helper.doSetUp(); | 5400 helper.doSetUp(); |
5402 } | 5401 } |
5403 | 5402 |
5404 void tearDown() { | 5403 void tearDown() { |
5405 helper.doTearDown(); | 5404 helper.doTearDown(); |
5406 } | 5405 } |
5407 } | 5406 } |
OLD | NEW |