Check that add() method is in fact MutableCollection.add()

#KT-18881 Fixed
This commit is contained in:
Dmitry Jemerov
2017-12-14 18:25:25 +01:00
parent 94b8614fb8
commit 64f01e53af
4 changed files with 47 additions and 2 deletions
@@ -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)
}
}