-
Notifications
You must be signed in to change notification settings - Fork 833
Improve error reporting: property setter in constructor expression #1228
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
Conversation
f8e0677 to
9bf4a80
Compare
|
I think this one is ready for review. |
|
Looks, good, probably the message needs tweaking though: The object constructor 'MyClass' has no argument or settable property named 'Property'. The required |
|
Suggested fix: getting the type signature in single quotes. This would be consistent with other PRs.
|
|
I thought we were dropping ' for types? Kevin- do we really need "object constructor" or can "constructor" suffice? |
|
@KevinRansom the "maybe you want part" is from the little helper that we brought in for "elm like" suggestions. We should change it to something that works everywhere. I agree the text should start with "Consider" since that is what we did for other messages as well. |
|
I think we didn't really come to a conclusion about wrapping types in ',
|
|
Sorry - wasn't my intention to come across so strong there :) Agree 100% consistency - thought ppl had agreed upon no quotes but I guess I wasn't correct there :) |
|
One thing I wish we had done before we started this is define the style of error messages we wanted, like slightly refined from what we have now or the whole shebang like Elm. |
No worries 😄
Let's kick off that discussion in #1103! We can outline what we think a good overall style can look like, and how to approach things like generic type signatures. |
|
@isaacabraham I'm okay with us iterating towards the best style. Already we understand a lot more about these messages than we did at the start. The bug fixes are easy to implement, try out and discuss. I think we are now in a much better state than we were and the more bugs we look at the better our understanding. Right now we quote replaceable types in messages. We could change that, it is however, a painful experience, given the various different types of tests we have. |
|
rebased |
|
Merged on behalf of @KevinRansom who is heads-down in tuples, and @otawfik-ms who is heads down in Roslyn Workspaces :) Thanks for the great contribution @forki, and for @isaacabraham too for kicking off this error message initiative |
fixes #1112