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 library test.src.serialization.elements_test; | 5 library test.src.serialization.elements_test; |
6 | 6 |
7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
8 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; | 8 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
9 import 'package:analyzer/dart/constant/value.dart'; | 9 import 'package:analyzer/dart/constant/value.dart'; |
10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
(...skipping 8399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8410 '''); | 8410 '''); |
8411 } else { | 8411 } else { |
8412 checkElementText( | 8412 checkElementText( |
8413 library, | 8413 library, |
8414 r''' | 8414 r''' |
8415 void f<T, U>((U) → T x) {} | 8415 void f<T, U>((U) → T x) {} |
8416 '''); | 8416 '''); |
8417 } | 8417 } |
8418 } | 8418 } |
8419 | 8419 |
| 8420 test_function_typed_parameter_implicit() { |
| 8421 var library = checkLibrary('f(g()) => null;'); |
| 8422 expect( |
| 8423 library |
| 8424 .definingCompilationUnit.functions[0].parameters[0].hasImplicitType, |
| 8425 isFalse); |
| 8426 } |
| 8427 |
8420 test_functions() { | 8428 test_functions() { |
8421 var library = checkLibrary('f() {} g() {}'); | 8429 var library = checkLibrary('f() {} g() {}'); |
8422 if (isStrongMode) { | 8430 if (isStrongMode) { |
8423 checkElementText( | 8431 checkElementText( |
8424 library, | 8432 library, |
8425 r''' | 8433 r''' |
8426 dynamic f() {} | 8434 dynamic f() {} |
8427 dynamic g() {} | 8435 dynamic g() {} |
8428 '''); | 8436 '''); |
8429 } else { | 8437 } else { |
(...skipping 6874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15304 fail('Unexpectedly tried to get unlinked summary for $uri'); | 15312 fail('Unexpectedly tried to get unlinked summary for $uri'); |
15305 } | 15313 } |
15306 return serializedUnit; | 15314 return serializedUnit; |
15307 } | 15315 } |
15308 | 15316 |
15309 @override | 15317 @override |
15310 bool hasLibrarySummary(String uri) { | 15318 bool hasLibrarySummary(String uri) { |
15311 return true; | 15319 return true; |
15312 } | 15320 } |
15313 } | 15321 } |
OLD | NEW |