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

Unified Diff: pkg/analyzer/test/src/summary/summary_common.dart

Issue 1635213003: Test some additional corner cases of type inference for summaries. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/summary_common.dart
diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
index bff69e6a52667874cced376a8f01cfab4834a098..b022c3bc7f51b7bae2670e05c4e672050f48e567 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -3738,6 +3738,22 @@ p.B b;
expect(unlinkedUnits[0].imports[0].uri, 'dart:async');
}
+ test_inferred_type_refers_to_bound_type_param() {
+ if (!strongMode || skipFullyLinkedData) {
+ return;
+ }
+ UnlinkedClass cls = serializeClassText(
+ 'class C<T> extends D<int, T> { var v; }'
+ ' abstract class D<U, V> { Map<V, U> get v; }',
+ className: 'C');
+ EntityRef type = getTypeRefForSlot(cls.fields[0].inferredTypeSlot);
+ // Check that v has inferred type Map<T, int>.
+ checkLinkedTypeRef(type, 'dart:core', 'dart:core', 'Map',
+ allowTypeParameters: true, numTypeParameters: 2);
+ checkParamTypeRef(type.typeArguments[0], 1);
+ checkLinkedTypeRef(type.typeArguments[1], 'dart:core', 'dart:core', 'int');
+ }
+
test_invalid_prefix_dynamic() {
if (checkAstDerivedData) {
// TODO(paulberry): get this to work properly.
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698