| 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 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1670 | 1670 |
| 1671 test_closure_executable_with_return_type_from_closure() { | 1671 test_closure_executable_with_return_type_from_closure() { |
| 1672 checkLibrary(''' | 1672 checkLibrary(''' |
| 1673 f() { | 1673 f() { |
| 1674 print(() {}); | 1674 print(() {}); |
| 1675 print(() => () => 0); | 1675 print(() => () => 0); |
| 1676 } | 1676 } |
| 1677 '''); | 1677 '''); |
| 1678 } | 1678 } |
| 1679 | 1679 |
| 1680 test_closure_generic() { |
| 1681 checkLibrary('final f = <U, V>(U x, V y) => y;'); |
| 1682 } |
| 1683 |
| 1680 test_closure_in_variable_declaration_in_part() { | 1684 test_closure_in_variable_declaration_in_part() { |
| 1681 addSource('/a.dart', 'part of lib; final f = (int i) => i.toDouble();'); | 1685 addSource('/a.dart', 'part of lib; final f = (int i) => i.toDouble();'); |
| 1682 checkLibrary(''' | 1686 checkLibrary(''' |
| 1683 library lib; | 1687 library lib; |
| 1684 part "a.dart"; | 1688 part "a.dart"; |
| 1685 '''); | 1689 '''); |
| 1686 } | 1690 } |
| 1687 | 1691 |
| 1688 test_const_invalid_field_const() { | 1692 test_const_invalid_field_const() { |
| 1689 variablesWithNotConstInitializers.add('f'); | 1693 variablesWithNotConstInitializers.add('f'); |
| (...skipping 3510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5200 fail('Unexpectedly tried to get unlinked summary for $uri'); | 5204 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 5201 } | 5205 } |
| 5202 return serializedUnit; | 5206 return serializedUnit; |
| 5203 } | 5207 } |
| 5204 | 5208 |
| 5205 @override | 5209 @override |
| 5206 bool hasLibrarySummary(String uri) { | 5210 bool hasLibrarySummary(String uri) { |
| 5207 return true; | 5211 return true; |
| 5208 } | 5212 } |
| 5209 } | 5213 } |
| OLD | NEW |