We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
?.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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"
The text was updated successfully, but these errors were encountered:
Yes, "this is not a constant expression" is an error for any static analysis, analyzer or CFE, when a constant expression is required.
Sorry, something went wrong.
No branches or pull requests
With the recent change the following code produces and error in CFE but no error in the analyzer.
@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"
The text was updated successfully, but these errors were encountered: