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

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

Issue 712393002: Incremental compilation of newly instantiated classes. (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
« no previous file with comments | « dart/pkg/dart2js_incremental/lib/library_updater.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 419171146939a2f47999bb687935779de9dc885e..ad5b39f079bb0a0018e18646dffea24bcb8f532a 100644
--- a/dart/tests/try/web/incremental_compilation_update_test.dart
+++ b/dart/tests/try/web/incremental_compilation_update_test.dart
@@ -407,6 +407,60 @@ main() {
""",
const <String> ['v2']),
],
+
+ // Test that a newly instantiated class is handled.
+ const <ProgramResult>[
+ const ProgramResult(
+ """
+class A {
+ m() {
+ print('Called A.m');
+ }
+}
+
+class B {
+ m() {
+ print('Called B.m');
+ }
+}
+
+var instance;
+main() {
+ if (instance == null) {
+ instance = new A();
+// } else {
+// instance = new B();
+ }
+ instance.m();
+}
+""",
+ const <String>['Called A.m']),
+ const ProgramResult(
+ """
+class A {
+ m() {
+ print('Called A.m');
+ }
+}
+
+class B {
+ m() {
+ print('Called B.m');
+ }
+}
+
+var instance;
+main() {
+ if (instance == null) {
+ instance = new A();
+ } else {
+ instance = new B();
+ }
+ instance.m();
+}
+""",
+ const <String>['Called B.m']),
+ ],
];
void main() {
« no previous file with comments | « dart/pkg/dart2js_incremental/lib/library_updater.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698