Check that add() method is in fact MutableCollection.add()
#KT-18881 Fixed
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// WITH_RUNTIME
|
||||
// IS_APPLICABLE: false
|
||||
// IS_APPLICABLE_2: false
|
||||
data class Node(private val data: MutableList<String>) {
|
||||
fun add(word: String) {
|
||||
data.add(word)
|
||||
}
|
||||
}
|
||||
|
||||
fun foo(node: Node, words: List<String>) {
|
||||
<caret>for (word in words) {
|
||||
node.add(word)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user