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 66c77369fcdd1227b486e1284630cf0f03fba57b..5377f3a24ec56b3b08710b674ea3e5bcbb903d41 100644 |
--- a/dart/tests/try/web/incremental_compilation_update_test.dart |
+++ b/dart/tests/try/web/incremental_compilation_update_test.dart |
@@ -1292,8 +1292,6 @@ main() { |
const ProgramResult( |
r""" |
main() { |
- // TODO(ahe): Remove next line when new constants are handled correctly. |
- [].map(null); |
print('v1'); |
} |
""", |
@@ -1371,6 +1369,34 @@ main() { |
""", |
const <String>['Called bar']), |
], |
+ |
+ // Test that constants are handled correctly. |
+ const <ProgramResult>[ |
+ const ProgramResult( |
+ r""" |
+class C { |
+ final String value; |
+ const C(this.value); |
+} |
+ |
+main() { |
+ print(const C('v1').value); |
+} |
+""", |
+ const <String>['v1']), |
+ const ProgramResult( |
+ r""" |
+class C { |
+ final String value; |
+ const C(this.value); |
+} |
+ |
+main() { |
+ print(const C('v2').value); |
+} |
+""", |
+ const <String>['v2']), |
+ ], |
]; |
void main() { |