-
Notifications
You must be signed in to change notification settings - Fork 1.1k
WIP: Narrow typers error positions #4511
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
WIP: Narrow typers error positions #4511
Conversation
As a followup to the earlier bugfix.
@Blaisorblade Can we get this in now please? We are blocked on a number of issues reporting stackoverflows until this in. |
@@ -16,7 +16,7 @@ object ErrorReporting { | |||
import tpd._ | |||
|
|||
def errorTree(tree: untpd.Tree, msg: => Message)(implicit ctx: Context): tpd.Tree = | |||
tree withType errorType(msg, tree.pos) | |||
tree withType errorType(msg, tree.pos.focus) |
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.
I'm not so sure anymore that this is a good idea, since it can lead to worse error messages
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.
Intended to avoid the need for scala#4511.
Closing. The blocker is in fact #4385, which I just unblocked otherwise. |
Ensures stackoverflows aren't hidden by errors, without needing scala#4511. Also add relevant testcase from scala#4385 (comment); I confirmed this fails without the position fix.
Ensures stackoverflows aren't hidden by errors, without needing scala#4511. Also add relevant testcase from scala#4385 (comment); I confirmed this fails without the position fix.
Suggested by @smarter. Gotta review and fix all the testcases. Needed to unblock #4385, which right now has too much potential to hide stack overflows.