KT-597 Type inference failed
Resolution rules changed: now autocast and non-autocast candidates are judged together
This commit is contained in:
@@ -216,7 +216,7 @@ fun declarationInsidePattern(x: (Any, Any)): String = when(x) { is (val a is Str
|
||||
fun mergeAutocasts(a: Any?) {
|
||||
if (a is String || a is Int) {
|
||||
a.<error descr="Unresolved reference: compareTo">compareTo</error>("")
|
||||
a.toString()
|
||||
<info descr="Automatically cast to Any">a</info>.toString()
|
||||
}
|
||||
if (a is Int || a is String) {
|
||||
a.<error descr="Unresolved reference: compareTo">compareTo</error>("")
|
||||
|
||||
Reference in New Issue
Block a user