Index: tests/compiler/dart2js/serialization/test_data.dart |
diff --git a/tests/compiler/dart2js/serialization/test_data.dart b/tests/compiler/dart2js/serialization/test_data.dart |
index 74ec44f5c161a0f2d9b43ccc4aa1280b0d89dbdb..5e3c9bbec7d27cf99d8d55d6e41b84073cc09b0a 100644 |
--- a/tests/compiler/dart2js/serialization/test_data.dart |
+++ b/tests/compiler/dart2js/serialization/test_data.dart |
@@ -455,6 +455,23 @@ class A { |
''', |
}), |
+ const Test('If-null expression in constant constructor', const { |
+ 'main.dart': ''' |
+import 'a.dart'; |
+ |
+main() { |
+ const A(1.0); |
+} |
+''', |
+ }, preserializedSourceFiles: const { |
+ 'a.dart': ''' |
+class A { |
+ final field1; |
+ const A(a) : this.field1 = a ?? 1.0; |
+} |
+''', |
+ }), |
+ |
const Test('Index set if null', const { |
'main.dart': ''' |
import 'a.dart'; |