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

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

Issue 1643403002: Test and fix a few more corner cases of summarizing type inference. (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
Index: pkg/analyzer/test/src/summary/resynthesize_test.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_test.dart b/pkg/analyzer/test/src/summary/resynthesize_test.dart
index a88ddf813ac625e19f32b5267ee95561c7f04fea..10b80f61738053ff9a18f6259eb1d19710c863b7 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
@@ -1501,6 +1501,19 @@ get x => null;''');
' abstract class D<U, V> { Map<V, U> get v; }');
}
+ test_inferred_type_refers_to_function_typed_parameter_type_generic_class() {
+ checkLibrary('class C<T, U> extends D<U, int> { void f(int x, g) {} }'
+ ' abstract class D<V, W> { void f(int x, W g(V s)); }');
+ }
+
+ test_inferred_type_refers_to_function_typed_parameter_type_other_lib() {
+ addLibrarySource(
+ '/a.dart', 'import "b.dart"; abstract class D extends E {}');
+ addLibrarySource(
+ '/b.dart', 'abstract class E { void f(int x, int g(String s)); }');
+ checkLibrary('import "a.dart"; class C extends D { void f(int x, g) {} }');
+ }
+
test_inferred_type_refers_to_method_function_typed_parameter_type() {
checkLibrary('class C extends D { void f(int x, g) {} }'
' abstract class D { void f(int x, int g(String s)); }');
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_elements.dart ('k') | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698