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

Unified Diff: pkg/analyzer/test/src/summary/resynthesize_test.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 | « no previous file | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0e7843d57c44085f1457ba8948806d263e5fdf74..93ee530a66428c1eb76ef10517e0eb5ffca7ad56 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
@@ -1228,6 +1228,26 @@ get x => null;''');
checkLibrary('import "a.dart"; import "b.dart"; C c; D d;');
}
+ test_inferred_type_is_typedef() {
+ checkLibrary('typedef int F(String s);'
+ ' class C extends D { var v; }'
+ ' abstract class D { F get v; }');
+ }
+
+ test_inferred_type_refers_to_bound_type_param() {
+ checkLibrary('class C<T> extends D<int, T> { var v; }'
+ ' abstract class D<U, V> { Map<V, U> get v; }');
+ }
+
+ test_inferred_type_via_function_typed_param() {
+ if (options.strongMode) {
+ // TODO(paulberry): get this test to pass.
+ return;
+ }
+ checkLibrary('class C extends D { f(g) {} }'
+ ' abstract class D { void f(int g(String)); }');
+ }
+
test_library() {
checkLibrary('');
}
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698