blob: d3f645150b25416300d6c9d75141d2402ebee2bf [file] [log] [blame]
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// This test contains a test case for each condition that can lead to the front
// end's `NullableSpreadError` error, for which we wish to report "why not
// promoted" context information.
// TODO(paulberry): get this to work with the CFE and add additional test cases
// if needed.
class C1 {
List<int>? bad;
}
test(C1 c) {
if (c.bad == null) return;
return [
... /*analyzer.notPromoted(propertyNotPromoted(member:C1.bad))*/ c.bad
];
}