-
Notifications
You must be signed in to change notification settings - Fork 98
Failed to format with new Explicit Backing Fields #531
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Was working on changing all the shared & state flows in our project to use K2 the new experimental "Explicit Backing Fields" and my ktfmt pre-commit hook failed with:
[ktfmt] Failed to format file: /path/to/file.kt (reason = 40:5: error: did not generate token "field")
This is the code using the backing fields that ktfmt is failing on:
private var time = Clock.System.now()
val stateFlow: StateFlow<Instant>
field = MutableStateFlow(time)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed