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

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

Issue 2236763002: fix wrong order to isAssignableTo for override params (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
Index: pkg/analyzer/test/src/task/strong/checker_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index 1b4dac99da5acdd8eb3ff7df31a7d5ea58c98748..7d6f844f9398e8806b0e46e0177863b2dd7bb48c 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -3009,6 +3009,23 @@ void takesF(void f(int x)) {
''');
}
+ void test_overrideNarrowsType() {
+ addFile(r'''
+class A {}
+class B extends A {}
+
+abstract class C {
+ m(A a);
+ n(B b);
+}
+abstract class D extends C {
+ /*error:INVALID_METHOD_OVERRIDE*/m(/*error:INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE*/B b);
Jennifer Messerly 2016/08/10 23:50:48 we should probably let error_verifier's messages r
+ n(A a);
+}
+ ''');
+ check(implicitCasts: false);
Jennifer Messerly 2016/08/10 23:50:48 This bug wasn't visible until we turn off implicit
+ }
+
void test_privateOverride() {
addFile(
'''

Powered by Google App Engine
This is Rietveld 408576698