Skip to content
New issue

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

[cfe] Wrong class name for record with one positional field #60290

Open
sgrekhov opened this issue Mar 10, 2025 · 1 comment
Open

[cfe] Wrong class name for record with one positional field #60290

sgrekhov opened this issue Mar 10, 2025 · 1 comment
Assignees
Labels
area-dart-model Use area-dart-model for issues related to packages analyzer, front_end, and kernel. cfe-messages Poor/undesirable messaging in errors/warnings emitted by the CFE. improve-diagnostics Related to the quality of diagnostic messages

Comments

@sgrekhov
Copy link
Contributor

sgrekhov commented Mar 10, 2025

(2,) + (3,); // Error: The operator '+' isn't defined for the class '(int)'.

The error message in CFE looks as if the + operator is not defined for the int class. Please change the class name to (int,), as it is done in the analyzer.

Dart SDK version: 3.8.0-166.0.dev (dev) (Tue Mar 4 20:02:17 2025 -0800) on "windows_x64"

@sgrekhov sgrekhov added cfe-messages Poor/undesirable messaging in errors/warnings emitted by the CFE. improve-diagnostics Related to the quality of diagnostic messages labels Mar 10, 2025
@lrhn lrhn added the area-dart-model Use area-dart-model for issues related to packages analyzer, front_end, and kernel. label Mar 10, 2025
@lrhn
Copy link
Member

lrhn commented Mar 10, 2025

(And consider not using the word "class" about a record type. That's confusing too. Maybe just use "type" instead in general.)

@johnniwinther johnniwinther self-assigned this Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart-model Use area-dart-model for issues related to packages analyzer, front_end, and kernel. cfe-messages Poor/undesirable messaging in errors/warnings emitted by the CFE. improve-diagnostics Related to the quality of diagnostic messages
Projects
None yet
Development

No branches or pull requests

3 participants