dbl -> toDouble
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
var a : Double = 0
|
||||
var b : Double = 0
|
||||
var c : Double = 0
|
||||
var ds : DoubleArray? = doubleArray((a).double, (b).double, (c).double)
|
||||
var ds : DoubleArray? = doubleArray((a).toDouble(), (b).toDouble(), (c).toDouble())
|
||||
@@ -1,8 +1,8 @@
|
||||
public open class Test(_myName : String?, _a : Boolean, _b : Double, _c : Float, _d : Long, _e : Int, _f : Short, _g : Char) {
|
||||
private val myName : String?
|
||||
private var a : Boolean = false
|
||||
private var b : Double = 0.double
|
||||
private var c : Float = 0.float
|
||||
private var b : Double = 0.toDouble()
|
||||
private var c : Float = 0.toFloat()
|
||||
private var d : Long = 0
|
||||
private var e : Int = 0
|
||||
private var f : Short = 0
|
||||
@@ -19,11 +19,11 @@ g = _g
|
||||
}
|
||||
class object {
|
||||
open public fun init() : Test {
|
||||
val __ = Test(null, false, 0.double, 0.float, 0, 0, 0, ' ')
|
||||
val __ = Test(null, false, 0.toDouble(), 0.toFloat(), 0, 0, 0, ' ')
|
||||
return __
|
||||
}
|
||||
open public fun init(name : String?) : Test {
|
||||
val __ = Test(foo(name), false, 0.double, 0.float, 0, 0, 0, ' ')
|
||||
val __ = Test(foo(name), false, 0.toDouble(), 0.toFloat(), 0, 0, 0, ' ')
|
||||
return __
|
||||
}
|
||||
open fun foo(n : String?) : String? {
|
||||
|
||||
@@ -4,8 +4,8 @@ open fun putInt(i : Int?) : Unit {
|
||||
}
|
||||
open fun test() : Unit {
|
||||
var b : Byte = 10
|
||||
putInt((b).int)
|
||||
putInt((b).toInt())
|
||||
var b2 : Byte? = 10
|
||||
putInt((b2).int)
|
||||
putInt((b2).toInt())
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,6 @@ open fun putInt(i : Int) : Unit {
|
||||
}
|
||||
open fun test() : Unit {
|
||||
var b : Byte = 10
|
||||
putInt((b).int)
|
||||
putInt((b).toInt())
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,6 @@ package demo
|
||||
open class Test(i : Int) {
|
||||
open fun test() : Unit {
|
||||
var b : Byte = 10
|
||||
Test((b).int)
|
||||
Test((b).toInt())
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
open class Test() {
|
||||
open fun getInt() : Int {
|
||||
var b : Byte = 10
|
||||
return b.int
|
||||
return b.toInt()
|
||||
}
|
||||
}
|
||||
@@ -8,5 +8,5 @@ var myContainer : Container? = Container()
|
||||
}
|
||||
}
|
||||
open class Test() {
|
||||
var b : Byte = One.myContainer?.myInt.sure().byte
|
||||
var b : Byte = One.myContainer?.myInt.sure().toByte()
|
||||
}
|
||||
@@ -9,6 +9,6 @@ var myContainer : Container? = Container()
|
||||
}
|
||||
open class Test() {
|
||||
open fun test() : Unit {
|
||||
var b : Byte = One.myContainer?.myInt.sure().byte
|
||||
var b : Byte = One.myContainer?.myInt.sure().toByte()
|
||||
}
|
||||
}
|
||||
@@ -2,17 +2,17 @@ open class Test() {
|
||||
open fun test() : Unit {
|
||||
var l1 : Long = 10
|
||||
var d1 : Double = 10.0
|
||||
var f1 : Float = 10.0.float
|
||||
var f1 : Float = 10.0.toFloat()
|
||||
var l2 : Long = 10
|
||||
var d2 : Double = 10.0
|
||||
var f2 : Float = 10.0.float
|
||||
var f2 : Float = 10.0.toFloat()
|
||||
}
|
||||
open fun testBoxed() : Unit {
|
||||
var l1 : Long? = 10
|
||||
var d1 : Double? = 10.0
|
||||
var f1 : Float? = 10.0.float
|
||||
var f1 : Float? = 10.0.toFloat()
|
||||
var l2 : Long? = 10
|
||||
var d2 : Double? = 10.0
|
||||
var f2 : Float? = 10.0.float
|
||||
var f2 : Float? = 10.0.toFloat()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user