Add toString() to Any, fix all tests
#KT-4517 Fixed
This commit is contained in:
@@ -179,7 +179,7 @@ fun returnFunctionLiteral(<info>a</info>: Any?): Function0<Int> =
|
||||
fun merge<TYPO descr="Typo: In word 'Autocasts'">Autocasts</TYPO>(a: Any?) {
|
||||
if (a is String || a is Int) {
|
||||
a.<error descr="[UNRESOLVED_REFERENCE] Unresolved reference: compareTo">compareTo</error>("")
|
||||
a.toString()
|
||||
<info descr="Automatically cast to jet.Any"><info>a</info></info>.toString()
|
||||
}
|
||||
if (a is Int || a is String) {
|
||||
a.<error descr="[UNRESOLVED_REFERENCE] Unresolved reference: compareTo">compareTo</error>("")
|
||||
|
||||
@@ -19,4 +19,7 @@ class C : Base<String, C, Unit>() {
|
||||
return super<Base>.hashCode()
|
||||
}
|
||||
override val method: (String?) -> String = ?
|
||||
override fun toString(): String {
|
||||
return super<Base>.toString()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,4 +30,7 @@ class C : A(), B {
|
||||
super<A>.publicFun()
|
||||
}
|
||||
override val publicProperty: Int = 0
|
||||
override fun toString(): String {
|
||||
return super<A>.toString()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,4 +17,7 @@ class C : A {
|
||||
override fun hashCode(): Int {
|
||||
return super<A>.hashCode()
|
||||
}
|
||||
override fun toString(): String {
|
||||
return super<A>.toString()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,9 @@ class C : A() {
|
||||
override fun hashCode(): Int {
|
||||
return super<A>.hashCode()
|
||||
}
|
||||
override fun toString(): String {
|
||||
return super<A>.toString()
|
||||
}
|
||||
|
||||
/*
|
||||
Some another comment
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
val x = 5.<ref>toString()
|
||||
//jet/Library.kt:toString
|
||||
//jet/Any.kt:toString
|
||||
|
||||
Reference in New Issue
Block a user