Primitive Companion objects do not longer implement IntegerConstants and FloatingPointConstants. All declarations moved inside companions.
IntegerConstants and FloatingPointConstants are dropped. #KT-8897 Fixed
This commit is contained in:
@@ -6,7 +6,6 @@ fun box(): String {
|
||||
testInCall()
|
||||
testDoubleConstants()
|
||||
testFloatConstants()
|
||||
testCallInterface()
|
||||
testLocalFun()
|
||||
testTopLevelFun()
|
||||
testVarTopField()
|
||||
@@ -60,20 +59,6 @@ fun testFloatConstants() {
|
||||
myAssertEquals(ni, Float.NEGATIVE_INFINITY)
|
||||
}
|
||||
|
||||
fun testCallInterface() {
|
||||
fun <T> floatPointConstants(a: FloatingPointConstants<T>) {
|
||||
val pi = a.POSITIVE_INFINITY
|
||||
val ni = a.NEGATIVE_INFINITY
|
||||
val nan = a.NaN
|
||||
|
||||
myAssertEquals(pi, a.POSITIVE_INFINITY)
|
||||
myAssertEquals(ni, a.NEGATIVE_INFINITY)
|
||||
}
|
||||
|
||||
floatPointConstants(Double)
|
||||
floatPointConstants(Float)
|
||||
}
|
||||
|
||||
fun testLocalFun() {
|
||||
fun Int.Companion.LocalFun() : String = "LocalFun"
|
||||
myAssertEquals("LocalFun", Int.LocalFun())
|
||||
|
||||
Reference in New Issue
Block a user