Dan O'Brien
09/10/2020, 12:26 PMe: /home/runner/work/intellij-plugin-ld/intellij-plugin-ld/src/main/kotlin/com/github/intheclouddan/intellijpluginld/settings/LaunchDarklySettings.kt: (155, 21): Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public fun <T> MutableCollection<in ???>.addAll(elements: Array<out ???>): Boolean defined in kotlin.collections
public fun <T> MutableCollection<in ???>.addAll(elements: Sequence<???>): Boolean defined in kotlin.collections
public fun <T> MutableCollection<in String!>.addAll(elements: Iterable<String!>): Boolean defined in kotlin.collections
I’ve tried assigned it to a variable and suppressing that as Unused, I’ve wrapped that section with a with
block but nothing so far is helping me with this error. Here’s a link to the line in the repo https://github.com/InTheCloudDan/intellij-plugin-ld/blob/master/src/main/kotlin/com/github/intheclouddan/intellijpluginld/settings/LaunchDarklySettings.kt#L155DefaultComboBoxModel
which has its own addAll
so I don’t know why it’s referencing MutableCollections?Michael de Kaste
09/10/2020, 2:56 PMDan O'Brien
09/10/2020, 2:58 PMkeys
is String, so it’s making a List of Stringskotlin.collections
when the method is part of the DefaultComboBoxModel
ilya.gorbunov
09/10/2020, 4:17 PMDefaultComboBoxModel
doesn't have addAll
method.
For example, I don't see it in JDK 8 docs https://docs.oracle.com/javase/8/docs/api/javax/swing/DefaultComboBoxModel.html, but I see it in the docs of JDK 11: https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/swing/DefaultComboBoxModel.htmlDan O'Brien
09/10/2020, 4:25 PM