Open
Description
With the recent change the following code produces and error in CFE but no error in the analyzer.
const String? c1 = null;
const int? c2 = c1 == null ? null : c1?.length; // Error: Null-aware property access can't be used in a constant expression.
main() {
print(c2);
}
@eernstg please confirm that there should be an analyzer error as well.
Dart SDK version: 3.9.0-edge.cddee72854b2c735148751f08eb0cc51d05854c9 (main) (Mon May 5 01:50:25 2025 -0700) on "linux_x64"