| 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 1884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1895 test_genericMethod_then() async { | 1895 test_genericMethod_then() async { |
| 1896 String code = r''' | 1896 String code = r''' |
| 1897 import 'dart:async'; | 1897 import 'dart:async'; |
| 1898 String toString(int x) => x.toString(); | 1898 String toString(int x) => x.toString(); |
| 1899 main() { | 1899 main() { |
| 1900 Future<int> bar = null; | 1900 Future<int> bar = null; |
| 1901 var foo = bar.then(toString); | 1901 var foo = bar.then(toString); |
| 1902 } | 1902 } |
| 1903 '''; | 1903 '''; |
| 1904 await resolveTestUnit(code); | 1904 await resolveTestUnit(code); |
| 1905 |
| 1905 expectInitializerType('foo', 'Future<String>', isNull); | 1906 expectInitializerType('foo', 'Future<String>', isNull); |
| 1906 } | 1907 } |
| 1907 | 1908 |
| 1908 test_genericMethod_then_prefixed() async { | 1909 test_genericMethod_then_prefixed() async { |
| 1909 String code = r''' | 1910 String code = r''' |
| 1910 import 'dart:async' as async; | 1911 import 'dart:async' as async; |
| 1911 String toString(int x) => x.toString(); | 1912 String toString(int x) => x.toString(); |
| 1912 main() { | 1913 main() { |
| 1913 async.Future<int> bar = null; | 1914 async.Future<int> bar = null; |
| 1914 var foo = bar.then(toString); | 1915 var foo = bar.then(toString); |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2412 main() { | 2413 main() { |
| 2413 var v = x; | 2414 var v = x; |
| 2414 v; // marker | 2415 v; // marker |
| 2415 } | 2416 } |
| 2416 int x = 3; | 2417 int x = 3; |
| 2417 '''; | 2418 '''; |
| 2418 await assertPropagatedAssignedType(code, typeProvider.intType, null); | 2419 await assertPropagatedAssignedType(code, typeProvider.intType, null); |
| 2419 await assertTypeOfMarkedExpression(code, typeProvider.intType, null); | 2420 await assertTypeOfMarkedExpression(code, typeProvider.intType, null); |
| 2420 } | 2421 } |
| 2421 } | 2422 } |
| OLD | NEW |