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

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

Issue 1409143009: fixes #24713, remove old generic substitution code in _getTypeOfProperty (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: remove unused parameter & format Created 5 years, 2 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/lib/src/generated/static_type_analyzer.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/generated/static_type_warning_code_test.dart
diff --git a/pkg/analyzer/test/generated/static_type_warning_code_test.dart b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
index 79ccd5800ce078d50f27588b5581d1e0817f9c91..99ab84c21c7f74b5be5fa4ff3bca74de1db49c6f 100644
--- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
@@ -832,6 +832,27 @@ class A {
verify([source]);
}
+ // https://github.com/dart-lang/sdk/issues/24713
+ void test_returnOfInvalidType_not_issued_for_valid_generic_return() {
+ Source source = addSource(r'''
+abstract class F<T, U> {
+ U get value;
+}
+
+abstract class G<T> {
+ T test(F<int, T> arg) => arg.value;
+}
+
+abstract class H<S> {
+ S test(F<int, S> arg) => arg.value;
+}
+
+void main() { }''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_returnOfInvalidType_void() {
Source source = addSource("void f() { return 42; }");
computeLibrarySourceErrors(source);
« no previous file with comments | « pkg/analyzer/lib/src/generated/static_type_analyzer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698