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

Unified Diff: pkg/analyzer/test/generated/static_type_analyzer_test.dart

Issue 2621433003: fixes #28236, generic methods should not cause warnings in Dart 1 (Closed)
Patch Set: test type annotation fix Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/generated/resolver_test_case.dart ('k') | pkg/pkg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/static_type_analyzer_test.dart
diff --git a/pkg/analyzer/test/generated/static_type_analyzer_test.dart b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
index 3a510f9a804f5811f6999d11b2d62b114ef08757..9d92cf508b9eb8d3c60ddcebd124737972b8df5e 100644
--- a/pkg/analyzer/test/generated/static_type_analyzer_test.dart
+++ b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
@@ -141,10 +141,11 @@ main() {
// C - m
TypeParameterType typeS;
{
- expectFunctionType('m);', '<S>(S) → void',
- elementTypeParams: '[S]', typeFormals: '[S]');
+ FunctionTypeImpl type = expectFunctionType('m);', '<S>(S) → void',
+ elementTypeParams: '[S]',
+ typeFormals: '[S]',
+ identifierType: '(dynamic) → void');
- FunctionTypeImpl type = findIdentifier('m);').staticType;
typeS = type.typeFormals[0].type;
type = type.instantiate([DynamicTypeImpl.instance]);
expect(type.toString(), '(dynamic) → void');
@@ -154,13 +155,13 @@ main() {
}
// C - m - f
{
- expectFunctionType('f);', '<U>(S, U) → void',
+ FunctionTypeImpl type = expectFunctionType('f);', '<U>(S, U) → void',
elementTypeParams: '[U]',
typeParams: '[S]',
typeArgs: '[S]',
- typeFormals: '[U]');
+ typeFormals: '[U]',
+ identifierType: '(S, dynamic) → void');
- FunctionTypeImpl type = findIdentifier('f);').staticType;
type = type.instantiate([DynamicTypeImpl.instance]);
expect(type.toString(), '(S, dynamic) → void');
expect(type.typeParameters.toString(), '[S, U]');
« no previous file with comments | « pkg/analyzer/test/generated/resolver_test_case.dart ('k') | pkg/pkg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698