-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Better error reporting is required for inlined non-immutable paths #21538
Comments
cc @Gedochao |
Note for future readers: Nicolas explained why inline values cannot be stable paths in #16804 (comment). What would you expect as a better error message? Something like the following?
|
To solve this issue, I suggest to special-case the scala3/compiler/src/dotty/tools/dotc/reporting/messages.scala Lines 1819 to 1825 in b8c5ecb
One can check if |
Seems good. I think the compiler started to have a standardize a format for providing hints.
|
This issue was picked for the Scala Issue Spree of tomorrow, September 24th. @HarrisL2, someone yet unknown and I will be working on it. |
As discovered in #16804 and raised again in #17181 and #21536, it is clear that better error reporting is required to prevent further ticket opening, by suggesting to remove the
inline
from the dependent argument in the compiler error message.Compiler version
v3.5.0
Minimized code
Output
Expectation
The compiler should provide a hint to remove the
inline
keyword from the dependent value to resolve the error.The text was updated successfully, but these errors were encountered: