I’m writing a “value class” following the recommen...
# intellij
d
I’m writing a “value class” following the recommendations in https://jakewharton.com/public-api-challenges-in-kotlin/. Then, I’m writing a test for it in Java to test that the builder logic portion of it works as expected. The test runs and passes, but IntelliJ (Android Studio) gives me an “Ambiguous method” error underline for calling the builder’s setters. The IDE seems to not notice the
@set:JvmSynthetic
annotation on the properties, so it’s confused about whether I’m calling the property setter or the manually-written builder-style setter. Furthermore, autocompletion etc. is broken on the remainder of chained builder calls after that underline. Even-furthermore, I can’t figure out a way to disable or lower the level of this error underline. Has anyone run across this and found a workaround? Should I file a bug somewhere? So far it’s reproducible in AS 3.5.3 and 3.6 RC 1.