Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: pkg/analyzer/test/src/summary/resynthesize_common.dart

Issue 2668493002: Issue 28547. Fix for summarizing code with invalid type parameter reference. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 4623 matching lines...) Expand 10 before | Expand all | Expand 10 after
4634 } 4634 }
4635 4635
4636 test_type_arguments_implicit() { 4636 test_type_arguments_implicit() {
4637 checkLibrary('Map m;'); 4637 checkLibrary('Map m;');
4638 } 4638 }
4639 4639
4640 test_type_dynamic() { 4640 test_type_dynamic() {
4641 checkLibrary('dynamic d;'); 4641 checkLibrary('dynamic d;');
4642 } 4642 }
4643 4643
4644 test_type_invalid_typeParameter_asPrefix() {
4645 checkLibrary(
4646 '''
4647 class C<T> {
4648 m(T.K p) {}
4649 }
4650 ''',
4651 allowErrors: true);
4652 }
4653
4644 test_type_reference_lib_to_lib() { 4654 test_type_reference_lib_to_lib() {
4645 checkLibrary('class C {} enum E { v } typedef F(); C c; E e; F f;'); 4655 checkLibrary('class C {} enum E { v } typedef F(); C c; E e; F f;');
4646 } 4656 }
4647 4657
4648 test_type_reference_lib_to_part() { 4658 test_type_reference_lib_to_part() {
4649 addSource('/a.dart', 'part of l; class C {} enum E { v } typedef F();'); 4659 addSource('/a.dart', 'part of l; class C {} enum E { v } typedef F();');
4650 checkLibrary('library l; part "a.dart"; C c; E e; F f;'); 4660 checkLibrary('library l; part "a.dart"; C c; E e; F f;');
4651 } 4661 }
4652 4662
4653 test_type_reference_part_to_lib() { 4663 test_type_reference_part_to_lib() {
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
5077 fail('Unexpectedly tried to get unlinked summary for $uri'); 5087 fail('Unexpectedly tried to get unlinked summary for $uri');
5078 } 5088 }
5079 return serializedUnit; 5089 return serializedUnit;
5080 } 5090 }
5081 5091
5082 @override 5092 @override
5083 bool hasLibrarySummary(String uri) { 5093 bool hasLibrarySummary(String uri) {
5084 return true; 5094 return true;
5085 } 5095 }
5086 } 5096 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698