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

Unified Diff: tests/language/check_method_override_test.dart

Issue 140803002: Perform override and inheritance checks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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: tests/language/check_method_override_test.dart
diff --git a/tests/language/const_constructor_mixin_test.dart b/tests/language/check_method_override_test.dart
similarity index 56%
copy from tests/language/const_constructor_mixin_test.dart
copy to tests/language/check_method_override_test.dart
index 83ad1563635e0a7a8477bc813f37784760702546..1fabfdd5b5a9d09a1dde2a82c2c5bf1951ef0428 100644
--- a/tests/language/const_constructor_mixin_test.dart
+++ b/tests/language/check_method_override_test.dart
@@ -2,19 +2,17 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-class Mixin {
-}
-
class A {
- const A(foo);
+ f([var x]) {}
+ foo(var a, [x, y]) {}
}
-class B extends A
- with Mixin /// 01: compile-time error
- {
- const B(foo) : super(foo);
+class C extends A {
+ f() {} /// 01: static type warning
+ foo(var a, [x]) {} /// 02: static type warning
}
main() {
- var a = const B(42);
-}
+ new A().foo(2);
+ new C().foo(1);
+}

Powered by Google App Engine
This is Rietveld 408576698