| 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 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/element/element.dart'; | 8 import 'package:analyzer/dart/element/element.dart'; |
| 9 import 'package:analyzer/dart/element/type.dart'; | 9 import 'package:analyzer/dart/element/type.dart'; |
| 10 import 'package:analyzer/src/dart/element/element.dart'; | 10 import 'package:analyzer/src/dart/element/element.dart'; |
| (...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1738 } | 1738 } |
| 1739 | 1739 |
| 1740 void test_genericMethod_nestedFunctions() { | 1740 void test_genericMethod_nestedFunctions() { |
| 1741 resolveTestUnit(r''' | 1741 resolveTestUnit(r''' |
| 1742 /*=S*/ f/*<S>*/(/*=S*/ x) { | 1742 /*=S*/ f/*<S>*/(/*=S*/ x) { |
| 1743 g/*<S>*/(/*=S*/ x) => f; | 1743 g/*<S>*/(/*=S*/ x) => f; |
| 1744 return null; | 1744 return null; |
| 1745 } | 1745 } |
| 1746 '''); | 1746 '''); |
| 1747 expectIdentifierType('f', '<S>(S) → S'); | 1747 expectIdentifierType('f', '<S>(S) → S'); |
| 1748 expectIdentifierType('g', '<S>(S) → dynamic'); | 1748 expectIdentifierType('g', '<S>(S) → <S>(S) → S'); |
| 1749 } | 1749 } |
| 1750 | 1750 |
| 1751 void test_genericMethod_override() { | 1751 void test_genericMethod_override() { |
| 1752 resolveTestUnit(r''' | 1752 resolveTestUnit(r''' |
| 1753 class C { | 1753 class C { |
| 1754 /*=T*/ f/*<T>*/(/*=T*/ x) => null; | 1754 /*=T*/ f/*<T>*/(/*=T*/ x) => null; |
| 1755 } | 1755 } |
| 1756 class D extends C { | 1756 class D extends C { |
| 1757 /*=T*/ f/*<T>*/(/*=T*/ x) => null; // from D | 1757 /*=T*/ f/*<T>*/(/*=T*/ x) => null; // from D |
| 1758 } | 1758 } |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2308 main() { | 2308 main() { |
| 2309 var v = x; | 2309 var v = x; |
| 2310 v; // marker | 2310 v; // marker |
| 2311 } | 2311 } |
| 2312 int x = 3; | 2312 int x = 3; |
| 2313 '''; | 2313 '''; |
| 2314 assertPropagatedAssignedType(code, typeProvider.intType, null); | 2314 assertPropagatedAssignedType(code, typeProvider.intType, null); |
| 2315 assertTypeOfMarkedExpression(code, typeProvider.intType, null); | 2315 assertTypeOfMarkedExpression(code, typeProvider.intType, null); |
| 2316 } | 2316 } |
| 2317 } | 2317 } |
| OLD | NEW |