| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 engine.non_error_resolver_test; | 5 library engine.non_error_resolver_test; |
| 6 | 6 |
| 7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/src/generated/ast.dart'; |
| 8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
| 9 import 'package:analyzer/src/generated/engine.dart'; | 9 import 'package:analyzer/src/generated/engine.dart'; |
| 10 import 'package:analyzer/src/generated/error.dart'; | 10 import 'package:analyzer/src/generated/error.dart'; |
| (...skipping 2970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2981 } | 2981 } |
| 2982 main() { | 2982 main() { |
| 2983 Functor f = new Functor(); | 2983 Functor f = new Functor(); |
| 2984 f(); | 2984 f(); |
| 2985 }'''); | 2985 }'''); |
| 2986 computeLibrarySourceErrors(source); | 2986 computeLibrarySourceErrors(source); |
| 2987 assertNoErrors(source); | 2987 assertNoErrors(source); |
| 2988 verify([source]); | 2988 verify([source]); |
| 2989 } | 2989 } |
| 2990 | 2990 |
| 2991 void test_issue_24191() { |
| 2992 Source source = addSource(''' |
| 2993 import 'dart:async'; |
| 2994 |
| 2995 class S extends Stream {} |
| 2996 f(S s) async { |
| 2997 await for (var v in s) { |
| 2998 print(v); |
| 2999 } |
| 3000 } |
| 3001 '''); |
| 3002 computeLibrarySourceErrors(source); |
| 3003 assertNoErrors(source); |
| 3004 verify([source]); |
| 3005 } |
| 3006 |
| 2991 void test_listElementTypeNotAssignable() { | 3007 void test_listElementTypeNotAssignable() { |
| 2992 Source source = addSource(r''' | 3008 Source source = addSource(r''' |
| 2993 var v1 = <int> [42]; | 3009 var v1 = <int> [42]; |
| 2994 var v2 = const <int> [42];'''); | 3010 var v2 = const <int> [42];'''); |
| 2995 computeLibrarySourceErrors(source); | 3011 computeLibrarySourceErrors(source); |
| 2996 assertNoErrors(source); | 3012 assertNoErrors(source); |
| 2997 verify([source]); | 3013 verify([source]); |
| 2998 } | 3014 } |
| 2999 | 3015 |
| 3000 void test_loadLibraryDefined() { | 3016 void test_loadLibraryDefined() { |
| (...skipping 2699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5700 reset(); | 5716 reset(); |
| 5701 } | 5717 } |
| 5702 | 5718 |
| 5703 void _check_wrongNumberOfParametersForOperator1(String name) { | 5719 void _check_wrongNumberOfParametersForOperator1(String name) { |
| 5704 _check_wrongNumberOfParametersForOperator(name, "a"); | 5720 _check_wrongNumberOfParametersForOperator(name, "a"); |
| 5705 } | 5721 } |
| 5706 | 5722 |
| 5707 CompilationUnit _getResolvedLibraryUnit(Source source) => | 5723 CompilationUnit _getResolvedLibraryUnit(Source source) => |
| 5708 analysisContext.getResolvedCompilationUnit2(source, source); | 5724 analysisContext.getResolvedCompilationUnit2(source, source); |
| 5709 } | 5725 } |
| OLD | NEW |