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 library analyzer.test.generated.strong_mode_test; | 5 library analyzer.test.generated.strong_mode_test; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; | 10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
(...skipping 2530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2541 C c; | 2541 C c; |
2542 } | 2542 } |
2543 '''; | 2543 '''; |
2544 await resolveTestUnit(code); | 2544 await resolveTestUnit(code); |
2545 assertNoErrors(testSource); | 2545 assertNoErrors(testSource); |
2546 expectIdentifierType('a;', 'A<dynamic>'); | 2546 expectIdentifierType('a;', 'A<dynamic>'); |
2547 expectIdentifierType('b;', 'B<num>'); | 2547 expectIdentifierType('b;', 'B<num>'); |
2548 expectIdentifierType('c;', 'C<List<int>>'); | 2548 expectIdentifierType('c;', 'C<List<int>>'); |
2549 } | 2549 } |
2550 | 2550 |
2551 /** | |
2552 * See https://github.com/dart-lang/sdk/issues/27725 | |
2553 * | |
2554 * TypeParameterMember.== is not implemented | |
2555 */ | |
2556 @failingTest | |
2557 test_instantiateToBounds_method_ok_referenceOther_before() async { | 2551 test_instantiateToBounds_method_ok_referenceOther_before() async { |
2558 String code = r''' | 2552 String code = r''' |
2559 class C<T> { | 2553 class C<T> { |
2560 void m<S0 extends T, S1 extends List<S0>>(S0 p0, S1 p1) {} | 2554 void m<S0 extends T, S1 extends List<S0>>(S0 p0, S1 p1) {} |
2561 | 2555 |
2562 void main() { | 2556 void main() { |
2563 m(null, null); | 2557 m(null, null); |
2564 } | 2558 } |
2565 } | 2559 } |
2566 '''; | 2560 '''; |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3088 var v = x; | 3082 var v = x; |
3089 v; // marker | 3083 v; // marker |
3090 } | 3084 } |
3091 int x = 3; | 3085 int x = 3; |
3092 '''; | 3086 '''; |
3093 CompilationUnit unit = await resolveSource(code); | 3087 CompilationUnit unit = await resolveSource(code); |
3094 assertPropagatedAssignedType(code, unit, typeProvider.intType, null); | 3088 assertPropagatedAssignedType(code, unit, typeProvider.intType, null); |
3095 assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null); | 3089 assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null); |
3096 } | 3090 } |
3097 } | 3091 } |
OLD | NEW |