Skip to content
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

Fix #13440: Avoid capturing var in message closure #13441

Merged
merged 1 commit into from Sep 3, 2021

Conversation

griggt
Copy link
Collaborator

@griggt griggt commented Sep 2, 2021

Fixes #13440

@griggt griggt changed the title Fix #13440 Fix #13440: Avoid capturing var in message closure Sep 2, 2021
@griggt griggt marked this pull request as ready for review September 2, 2021 03:09
@som-snytt
Copy link
Contributor

With this branch, I get

java.lang.NullPointerException: Cannot invoke "dotty.tools.dotc.core.Names$SimpleName.length()" because the return value of "dotty.tools.dotc.parsing.Scanners$Scanner.name()" is null while compiling keyword.scala

for

val s = s"$enum"

@nicolasstucki
Copy link
Contributor

@griggt could you rebase this PR? I want to test a theory, it might sole the source-link-test.

@nicolasstucki nicolasstucki merged commit 6a3cd1f into scala:master Sep 3, 2021
@som-snytt
Copy link
Contributor

I see you ignored my comment, but did you actually try it?

@griggt griggt deleted the fix-13440 branch September 3, 2021 14:44
@griggt
Copy link
Collaborator Author

griggt commented Sep 3, 2021

but did you actually try it?

Was this question for me? Yes, I tried it. It looks like you uncovered additional issues with the existing implementation.

This was just intended as a quickie PR to fix the original issue as reported in #13440. It seems that #13442 tackles those additional issues.

@Kordyjan Kordyjan added this to the 3.1.1 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StringFormatter.showArg throws NullPointerException
4 participants