sdk
sdk copied to clipboard
[CFE] Adjust error message in case of record type
Consider the following code
void foo((int,) r) {}
main() {
foo((1)); // Error: The argument type 'int' can't be assigned to the parameter type '(int)'.
}
CFE produces an error Error: The argument type 'int' can't be assigned to the parameter type '(int)'.. But the type of the parameter here is (int,) not (int)
Dart SDK version: 3.4.0-edge.148d5ac76d53537d808ec8a8a45f38ff88d57528 (main) (Sun Jan 28 18:15:40 2024 +0000) on "linux_x64"
See also https://github.com/dart-lang/sdk/issues/60290, which has relevant discussion on it.