Crash with synchronized - new in 0.26
See original GitHub issueThis sample code:
class Foo {
companion object {
var instance: Foo? = null
fun getInstance() {
return instance ?: synchronized(Foo::class) {
Foo().also { instance = it }
}
}
}
}
crashes the formatter with
error: did not generate token "("
com.google.googlejavaformat.FormattingError: 9:51: error: did not generate token "("
at com.google.googlejavaformat.OpsBuilder.sync(OpsBuilder.java:231)
at com.facebook.ktfmt.KotlinInputAstVisitorBase.sync(KotlinInputAstVisitorBase.kt:2298)
at com.facebook.ktfmt.KotlinInputAstVisitorBase.visitLambdaExpression(KotlinInputAstVisitorBase.kt:806)
...
The formatter handled this fine in 0.25.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Itunes crashes on Synch - Apple Support Communities
The computer is about 6 months old, so still relatively new. On the computer, I am running Itunes Version 12.11.0.26.
Read more >Snap sync crash #22172 - ethereum/go-ethereum - GitHub
System information Geth version: running this PR: #22171 Backtrace Jan 14 15:28:42 mon02.ethdevops.io geth ERROR[01-14|14:28:42.822] Failed ...
Read more >Release Notes | Mimestream
(macOS 13) Crash when accessing contacts without authorization ... New messages with no labels don't sync via push; Already-open compose ... Version 0.26.2....
Read more >Publii hotfix 0.26.1 released; squashes bugs and improves navigation
Improved behaviour of "Cancel" button on the "Add new website" view. Added clear button to the Site Switcher search bar. Changed sync button...
Read more >The New Version 0.26.12 | The Welkin Suite
This new version includes a lot of changes related to the custom folder structure synchronization, the build process, work with test results and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Example pull request here that I think should fix the issue, but I won’t be able to test it for regressions on real code until tomorrow or possibly later this week: https://github.com/facebookincubator/ktfmt/pull/244
SG, thanks Carmi!