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

Unified Diff: pkg/analyzer/test/src/task/strong/inferred_type_test.dart

Issue 2291103004: fix #25740 again, making sure we have the substituted bound in inference (Closed)
Patch Set: merge and add todo Created 4 years, 4 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/type_system_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/task/strong/inferred_type_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
index 0087b3d35a5be8e2cf7b5343a9986cb494b457b4..7eaab57e3525902c2912b6a05bc7e7105337e406 100644
--- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
@@ -1761,14 +1761,18 @@ main() {
// Regression test for https://github.com/dart-lang/sdk/issues/25740.
checkFile(r'''
class Foo<T extends Pattern> {
- void method/*<U extends T>*/(dynamic/*=U*/ u) {}
+ /*=U*/ method/*<U extends T>*/(/*=U*/ u) => u;
}
main() {
- new Foo().method/*<String>*/("str");
+ String s;
+ var a = new Foo().method/*<String>*/("str");
+ s = a;
new Foo();
- new Foo<String>().method("str");
- new Foo().method("str");
+ var b = new Foo<String>().method("str");
+ s = b;
+ var c = new Foo().method("str");
+ s = c;
new Foo<String>().method(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/42);
}
« no previous file with comments | « pkg/analyzer/test/generated/type_system_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698