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

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

Issue 720813002: Incremental compilation of new classes with fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r41823. 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 ffea918265210b7fc40e6a5fa083958de8a93060..e31e86b4c77d085fcfaf2f59ace276f5b11276de 100644
--- a/dart/tests/try/web/incremental_compilation_update_test.dart
+++ b/dart/tests/try/web/incremental_compilation_update_test.dart
@@ -536,6 +536,49 @@ main() {
""",
const <String>['Called B.m']),
],
+
+ // Test that fields of a newly instantiated class are handled.
+ const <ProgramResult>[
+ const ProgramResult(
+ r"""
+class A {
+ var x;
+ A(this.x);
+}
+var instance;
+foo() {
+ if (instance != null) {
+ print(instance.x);
+ } else {
+ print('v1');
+ }
+}
+main() {
+ foo();
+}
+""",
+ const <String>['v1']),
+ const ProgramResult(
+ r"""
+class A {
+ var x;
+ A(this.x);
+}
+var instance;
+foo() {
+ if (instance != null) {
+ print(instance.x);
+ } else {
+ print('v1');
+ }
+}
+main() {
+ instance = new A('v2');
+ foo();
+}
+""",
+ const <String>['v2']),
+ ],
];
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