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

Side by Side Diff: pkg/analyzer/test/generated/resolver_test.dart

Issue 1563383002: Fix a few missed references to boundTypeParameters. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 analyzer.test.generated.resolver_test; 5 library analyzer.test.generated.resolver_test;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
(...skipping 13204 matching lines...) Expand 10 before | Expand all | Expand 10 after
13215 } 13215 }
13216 13216
13217 void test_genericFunction_parameter() { 13217 void test_genericFunction_parameter() {
13218 _resolveTestUnit(r''' 13218 _resolveTestUnit(r'''
13219 void g(/*=T*/ f/*<T>*/(/*=T*/ x)) {} 13219 void g(/*=T*/ f/*<T>*/(/*=T*/ x)) {}
13220 '''); 13220 ''');
13221 SimpleIdentifier f = _findIdentifier('f'); 13221 SimpleIdentifier f = _findIdentifier('f');
13222 ParameterElementImpl e = f.staticElement; 13222 ParameterElementImpl e = f.staticElement;
13223 FunctionType type = e.type; 13223 FunctionType type = e.type;
13224 expect(e.typeParameters.toString(), '[T]'); 13224 expect(e.typeParameters.toString(), '[T]');
13225 expect(type.boundTypeParameters.toString(), '[T]'); 13225 expect(type.typeFormals.toString(), '[T]');
13226 expect(type.toString(), '<T>(T) → T'); 13226 expect(type.toString(), '<T>(T) → T');
13227 FunctionType ft = type.instantiate([typeProvider.stringType]); 13227 FunctionType ft = type.instantiate([typeProvider.stringType]);
13228 expect(ft.toString(), '(String) → String'); 13228 expect(ft.toString(), '(String) → String');
13229 } 13229 }
13230 13230
13231 void test_genericFunction_static() { 13231 void test_genericFunction_static() {
13232 _resolveTestUnit(r''' 13232 _resolveTestUnit(r'''
13233 class C<E> { 13233 class C<E> {
13234 static /*=T*/ f/*<T>*/(/*=T*/ x) => null; 13234 static /*=T*/ f/*<T>*/(/*=T*/ x) => null;
13235 } 13235 }
(...skipping 3362 matching lines...) Expand 10 before | Expand all | Expand 10 after
16598 16598
16599 void _resolveTestUnit(String code) { 16599 void _resolveTestUnit(String code) {
16600 testCode = code; 16600 testCode = code;
16601 testSource = addSource(testCode); 16601 testSource = addSource(testCode);
16602 LibraryElement library = resolve2(testSource); 16602 LibraryElement library = resolve2(testSource);
16603 assertNoErrors(testSource); 16603 assertNoErrors(testSource);
16604 verify([testSource]); 16604 verify([testSource]);
16605 testUnit = resolveCompilationUnit(testSource, library); 16605 testUnit = resolveCompilationUnit(testSource, library);
16606 } 16606 }
16607 } 16607 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698