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

Unified Diff: tests/language/src/OverrideMethodWithFieldTest.dart

Issue 8360022: Fix member overriding rules in VM according to latest spec. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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 | « tests/language/src/OverrideFieldTest.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/OverrideMethodWithFieldTest.dart
===================================================================
--- tests/language/src/OverrideMethodWithFieldTest.dart (revision 605)
+++ tests/language/src/OverrideMethodWithFieldTest.dart (working copy)
@@ -11,9 +11,9 @@
}
class Sub extends Super {
- Sub() : super(), this.instanceMethod = 87;
+ Sub() : super();
- var instanceMethod; // Intentional static type error.
+ var instanceMethod = 87; /// 01: compile-time error
superInstanceMethod() => super.instanceMethod();
}
@@ -22,10 +22,7 @@
var s = new Sub();
Super sup = s;
Sub sub = s;
- Expect.equals(87, s.instanceMethod);
Expect.equals(42, s.superInstanceMethod());
- Expect.equals(87, sup.instanceMethod);
Expect.equals(42, sup.superInstanceMethod()); // Intentional static type error.
- Expect.equals(87, sub.instanceMethod);
Expect.equals(42, sub.superInstanceMethod());
}
« no previous file with comments | « tests/language/src/OverrideFieldTest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698