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

Unified Diff: dart/tests/try/web/incremental_compilation_update_test.dart

Issue 701133003: Implement removal of overridden instance methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r41632 Created 6 years, 1 month 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: dart/tests/try/web/incremental_compilation_update_test.dart
diff --git a/dart/tests/try/web/incremental_compilation_update_test.dart b/dart/tests/try/web/incremental_compilation_update_test.dart
index 70c65448e4d2204e2280b4614cedd2c136e1cba7..2223ce6e4a0e9f2030883316dadae93b00eebc2d 100644
--- a/dart/tests/try/web/incremental_compilation_update_test.dart
+++ b/dart/tests/try/web/incremental_compilation_update_test.dart
@@ -197,6 +197,102 @@ main() {
""",
const <String> ['v2']),
],
+
+// // Test that deleting an instance method works.
Johnni Winther 2014/11/13 10:33:40 Why is this section commented out.
ahe 2014/11/13 11:07:46 Because I don't yet remove the instance method. Th
+// const <ProgramResult>[
+// const ProgramResult(
+// """
+// class C {
+// m() {
+// print('v1');
+// }
+// }
+// var instance;
+// main() {
+// if (instance == null) {
+// instance = new C();
+// }
+// try {
+// instance.m();
+// } catch (e) {
+// print('v2');
+// }
+// }
+// """,
+// const <String> ['v1']),
+// const ProgramResult(
+// """
+// class C {
+// }
+// var instance;
+// main() {
+// if (instance == null) {
+// instance = new C();
+// }
+// try {
+// instance.m();
+// } catch (e) {
+// print('v2');
+// }
+// }
+// """,
+// const <String> ['v2']),
+// ],
+
+ // Test that deleting an instance method works, even when accessed through
+ // super.
+ const <ProgramResult>[
+ const ProgramResult(
+ """
+class A {
+ m() {
+ print('v2');
+ }
+}
+class B extends A {
+ m() {
+ print('v1');
+ }
+}
+class C extends B {
+ m() {
+ super.m();
+ }
+}
+var instance;
+main() {
+ if (instance == null) {
+ instance = new C();
+ }
+ instance.m();
+}
+""",
+ const <String> ['v1']),
+ const ProgramResult(
+ """
+class A {
+ m() {
+ print('v2');
+ }
+}
+class B extends A {
+}
+class C extends B {
+ m() {
+ super.m();
+ }
+}
+var instance;
+main() {
+ if (instance == null) {
+ instance = new C();
+ }
+ instance.m();
+}
+""",
+ const <String> ['v2']),
+ ],
+
];
void main() {

Powered by Google App Engine
This is Rietveld 408576698