Has anyone experienced an issue where autocompleti...
# intellij
e
Has anyone experienced an issue where autocompleting a sealed interface / class will occasionally put
()
at the end of the name? I thought there was an open issue for it on YouTrack, but I can't seem to find it now.
c
It's when you use KotlinX.Serialization, IntelliJ gets confused by the generated constructor. That's been the case since forever AFAIK
e
Is that not fixable?
c
No idea, I never took the time to create a ticket 😕
r
Hey! Could you please provide more details/examples so that we can file the issue?
e
Copy code
sealed interface Foo {
  data object Bar : Foo
  data object Baz : Foo
}
If I want
Foo.Bar
and I type
Fo
then the first autocomplete result is
Foo()
. I'll take a screen recording of the issue and get the debug info for the autocomplete result when I'm back at my computer.
r
Do you use K2 Mode or K1 Mode in your plugin?
e
Mostly K1
Of course now that I'm trying to repro it, it doesn't happen 😅 I will update with the debug info if I see it again
c
@eygraber in my case, it would happen only with sealed classes annotated with
@Serializable
🤔
e
Untitled
It happens to me without
@Serializable
and the module where it happens doesn't have the serialization plugin or libraries.
👀 1
r
For the record: this
()
insertion should not happen in K2 Mode, but it can happen with K1 Mode