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:
Ilya Gorbunov
2015-12-24 06:17:03 +03:00
parent fc4250b02b
commit de11ed4fc6
14 changed files with 355 additions and 228 deletions
@@ -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())