Error:
Type mismatch: inferred type is Array<MutableSet<String>?> but IntArray was expected
Code:
fun tab10(): IntArray {
var Arr1 = arrayOf(player.chart_keys)
return Arr1
}
chart_keys is in a different class Player
var chart_keys: MutableSet<String>? = mutableSetOf(),
Is it possible?
IntArrayShow which code produces this errorplayer.chart_keysarrayOfwill create an array of whatever you pass into it. Therefore, passing aMutableSet<String>into it will create array ofMutableSet<String>chart_keys? Why does it have a_instead ofK? Why is the set mutable? Can it be immutable?