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

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

Issue 719443002: Incremental compilation: set up inheritance. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 9ce598642fd43e78f8c1d27c4a3157519f63169b..ffea918265210b7fc40e6a5fa083958de8a93060 100644
--- a/dart/tests/try/web/incremental_compilation_update_test.dart
+++ b/dart/tests/try/web/incremental_compilation_update_test.dart
@@ -482,6 +482,60 @@ main() {
""",
const <String>['a', 'b', 'c']),
],
+
+ // Test that a newly instantiated class is handled.
+ const <ProgramResult>[
+ const ProgramResult(
+ r"""
+class A {
+ get name => 'A.m';
+
+ m() {
+ print('Called $name');
+ }
+}
+
+class B extends A {
+ get name => 'B.m';
+}
+
+var instance;
+main() {
+ if (instance == null) {
+ instance = new A();
+// } else {
+// instance = new B();
+ }
+ instance.m();
+}
+""",
+ const <String>['Called A.m']),
+ const ProgramResult(
+ r"""
+class A {
+ get name => 'A.m';
+
+ m() {
+ print('Called $name');
+ }
+}
+
+class B extends A {
+ get name => 'B.m';
+}
+
+var instance;
+main() {
+ if (instance == null) {
+ instance = new A();
+ } else {
+ instance = new B();
+ }
+ instance.m();
+}
+""",
+ const <String>['Called B.m']),
+ ],
];
void main() {

Powered by Google App Engine
This is Rietveld 408576698