-
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
Crash on new line after extension def without result type or RHS #18265
Comments
This issue was picked for the Issue Spree No. 35 of 22 August 2023 which takes place in 7 days. @jan-pieter, @hamzaremmal, @XLPI will be working on it. If you have any insight into the issue or guidance on how to fix it, please leave it here. |
This commit fixes a bug that causes Scala compiler to crash due to position error when an extension method folowed by a newline has neither type annotation nor `= <expr>`.
This commit fixes a bug that causes Scala compiler to crash due to position error when an extension method followed by a newline has neither type annotation nor `= <expr>`.
This commit fixes a bug that causes Scala compiler to crash due to position error when an extension method followed by a newline has neither type annotation nor `= <expr>`. This commit is based on scala#18445. Co-Authored-By: @hamzaremmal
Here is another minimized program that appear to trigger the same issue: given A with
def a
Doesn't matter whether (again, notice the trailing line!) |
close #18265 This commit fixes a bug that causes Scala compiler to crash due to position error when an extension method followed by a newline has neither type annotation nor `= <expr>`. This commit is based on #18445. Co-Authored-By: @hamzaremmal
This commit fixes a bug that causes Scala compiler to crash due to position error when an extension method followed by a newline has neither type annotation nor `= <expr>`. This commit is based on #18445. Co-Authored-By: @hamzaremmal [Cherry-picked caf30e3]
This commit fixes a bug that causes Scala compiler to crash due to position error when an extension method followed by a newline has neither type annotation nor `= <expr>`. This commit is based on #18445. Co-Authored-By: @hamzaremmal [Cherry-picked caf30e3]
Compiler version
3.2.0, 3.3.0, 3.3.2-RC1-bin-20230720-98b452d-NIGHTLY
Used not to crash in 3.1.0
Minimized code
(Note the empty line at the end)
Output (click arrow to expand)
Expectations
The compilation should fail but without a crash. Note that there's no crash if the empty line gets removed from the end of the file.
The text was updated successfully, but these errors were encountered: