| 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() {
|
|
|