reline
09/18/2017, 1:34 PMmyString == null
it matches both the String?
and Int?
types. Anyone know a way around this?
fun hello(myString: String?, myBoolean: Boolean) {}
fun hello(myInt: Int?, myBoolean: Boolean) {}
fun hi(myString: String?) {
if (myString == null) {
hello(myString, false) //overload resolution ambiguity
} else {
hello(myString, true) // this works fine
}
}
marstran
09/18/2017, 1:36 PMhello
with either null as Int?
or null as String?
should resolve the ambiguity.reline
09/18/2017, 1:37 PM