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 4661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4672 ''' | 4672 ''' |
4673 class C<T extends V> {} | 4673 class C<T extends V> {} |
4674 typedef V F(V p); | 4674 typedef V F(V p); |
4675 V f(V p) {} | 4675 V f(V p) {} |
4676 V V2 = null; | 4676 V V2 = null; |
4677 int V = 0; | 4677 int V = 0; |
4678 ''', | 4678 ''', |
4679 allowErrors: true); | 4679 allowErrors: true); |
4680 } | 4680 } |
4681 | 4681 |
| 4682 test_type_invalid_topLevelVariableElement_asTypeArgument() { |
| 4683 checkLibrary( |
| 4684 ''' |
| 4685 var V; |
| 4686 static List<V> V2; |
| 4687 ''', |
| 4688 allowErrors: true); |
| 4689 } |
| 4690 |
4682 test_type_invalid_typeParameter_asPrefix() { | 4691 test_type_invalid_typeParameter_asPrefix() { |
4683 checkLibrary( | 4692 checkLibrary( |
4684 ''' | 4693 ''' |
4685 class C<T> { | 4694 class C<T> { |
4686 m(T.K p) {} | 4695 m(T.K p) {} |
4687 } | 4696 } |
4688 ''', | 4697 ''', |
4689 allowErrors: true); | 4698 allowErrors: true); |
4690 } | 4699 } |
4691 | 4700 |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5125 fail('Unexpectedly tried to get unlinked summary for $uri'); | 5134 fail('Unexpectedly tried to get unlinked summary for $uri'); |
5126 } | 5135 } |
5127 return serializedUnit; | 5136 return serializedUnit; |
5128 } | 5137 } |
5129 | 5138 |
5130 @override | 5139 @override |
5131 bool hasLibrarySummary(String uri) { | 5140 bool hasLibrarySummary(String uri) { |
5132 return true; | 5141 return true; |
5133 } | 5142 } |
5134 } | 5143 } |
OLD | NEW |