-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Update error message at Parsers.scala:1901 #1616
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
FYI I'm behind at least one PR that will conflict. Noting this since I'm not familiar with the capabilities of the CI |
|trait Shape { | ||
| def area: Double | ||
|}""".stripMargin | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So first off, you're correctly stating that if a trait method does not have a return type it needs to be clarified. But why is this? It's an abstract definition; we need to know what it's type is when we implement it somewhere else.
I also have a different nitpick, so the error messages obey a flag called -pagewidth X
, where X
is the max number of columns that should be printed in the terminal. As such, I would suggest that you split line 408 to be no more than 80 characters (i.e. newline after area
).
Good job otherwise, and thanks for cleaning up the trailing whitespace ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comments. How does this read?
An abstract declaration must have a return type. For example:
|
|trait Shape {
| def area: Double // abstract declaration returning a ${"Double"}
|}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that looks fine. Make the change and this is approved for merge :)
Oh and also, second nitpick! Make your commit message subject line a bit shorter, put the rest in the body - example:
Cheers! |
f20b48a
to
7c99ecd
Compare
7c99ecd
to
7b774b0
Compare
LGTM - a rebase and an update on the |
This one is about a 'missing return type' when we can't infer a type. I used tests/neg/i871.scala to verify the change.
7b774b0
to
c8595ca
Compare
This one is about a 'missing return type' when we can't infer a type. I used tests/neg/i871.scala to verify the change