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

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

Issue 2762743002: Include type arguments for non-synthetic FunctionTypeImpl(s) into displayName. (Closed)
Patch Set: Created 3 years, 9 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 9750 matching lines...) Expand 10 before | Expand all | Expand 10 after
9761 test_instantiateToBounds_functionTypeAlias_simple() { 9761 test_instantiateToBounds_functionTypeAlias_simple() {
9762 var library = checkLibrary(''' 9762 var library = checkLibrary('''
9763 typedef F<T extends num>(T p); 9763 typedef F<T extends num>(T p);
9764 F f; 9764 F f;
9765 '''); 9765 ''');
9766 if (isStrongMode) { 9766 if (isStrongMode) {
9767 checkElementText( 9767 checkElementText(
9768 library, 9768 library,
9769 r''' 9769 r'''
9770 typedef dynamic F<T extends num>(T p); 9770 typedef dynamic F<T extends num>(T p);
9771 F f; 9771 F<num> f;
9772 '''); 9772 ''');
9773 } else { 9773 } else {
9774 checkElementText( 9774 checkElementText(
9775 library, 9775 library,
9776 r''' 9776 r'''
9777 typedef dynamic F<T extends num>(T p); 9777 typedef dynamic F<T extends num>(T p);
9778 F f; 9778 F f;
9779 '''); 9779 ''');
9780 } 9780 }
9781 } 9781 }
(...skipping 3926 matching lines...) Expand 10 before | Expand all | Expand 10 after
13708 } 13708 }
13709 } 13709 }
13710 13710
13711 test_type_reference_to_typedef_with_type_arguments() { 13711 test_type_reference_to_typedef_with_type_arguments() {
13712 var library = checkLibrary('typedef U F<T, U>(T t); F<int, String> f;'); 13712 var library = checkLibrary('typedef U F<T, U>(T t); F<int, String> f;');
13713 if (isStrongMode) { 13713 if (isStrongMode) {
13714 checkElementText( 13714 checkElementText(
13715 library, 13715 library,
13716 r''' 13716 r'''
13717 typedef U F<T, U>(T t); 13717 typedef U F<T, U>(T t);
13718 F f; 13718 F<int, String> f;
13719 '''); 13719 ''');
13720 } else { 13720 } else {
13721 checkElementText( 13721 checkElementText(
13722 library, 13722 library,
13723 r''' 13723 r'''
13724 typedef U F<T, U>(T t); 13724 typedef U F<T, U>(T t);
13725 F f; 13725 F<int, String> f;
13726 '''); 13726 ''');
13727 } 13727 }
13728 } 13728 }
13729 13729
13730 test_type_reference_to_typedef_with_type_arguments_implicit() { 13730 test_type_reference_to_typedef_with_type_arguments_implicit() {
13731 var library = checkLibrary('typedef U F<T, U>(T t); F f;'); 13731 var library = checkLibrary('typedef U F<T, U>(T t); F f;');
13732 if (isStrongMode) { 13732 if (isStrongMode) {
13733 checkElementText( 13733 checkElementText(
13734 library, 13734 library,
13735 r''' 13735 r'''
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after
14981 fail('Unexpectedly tried to get unlinked summary for $uri'); 14981 fail('Unexpectedly tried to get unlinked summary for $uri');
14982 } 14982 }
14983 return serializedUnit; 14983 return serializedUnit;
14984 } 14984 }
14985 14985
14986 @override 14986 @override
14987 bool hasLibrarySummary(String uri) { 14987 bool hasLibrarySummary(String uri) {
14988 return true; 14988 return true;
14989 } 14989 }
14990 } 14990 }
OLDNEW
« pkg/analyzer/lib/src/dart/element/type.dart ('K') | « pkg/analyzer/lib/src/dart/element/type.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698