Add overrides by name. (#54)
This commit is contained in:
@@ -188,11 +188,10 @@ task hello2(type: RunKonanTest) {
|
|||||||
source = "runtime/basic/hello2.kt"
|
source = "runtime/basic/hello2.kt"
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: enable, once can call toString() on Int.
|
|
||||||
task hello3(type: RunKonanTest) {
|
task hello3(type: RunKonanTest) {
|
||||||
goldValue = "239"
|
goldValue = "239\ntrue\n3.14159\nA\n"
|
||||||
source = "runtime/basic/hello3.kt"
|
source = "runtime/basic/hello3.kt"
|
||||||
} */
|
}
|
||||||
|
|
||||||
task tostring0(type: RunKonanTest) {
|
task tostring0(type: RunKonanTest) {
|
||||||
goldValue = "127\n255\n239\nA\n1122334455\n112233445566778899\n1E+27\n1E-300\ntrue\nfalse\n"
|
goldValue = "127\n255\n239\nA\n1122334455\n112233445566778899\n1E+27\n1E-300\ntrue\nfalse\n"
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
fun main(args : Array<String>) {
|
fun main(args : Array<String>) {
|
||||||
print(239)
|
println(239)
|
||||||
|
// TODO: enable, once override by name is implemented.
|
||||||
|
println(true)
|
||||||
|
println(3.14159)
|
||||||
|
println('A')
|
||||||
}
|
}
|
||||||
@@ -3,14 +3,82 @@ package kotlin.io
|
|||||||
@kotlin.SymbolName("Kotlin_io_Console_print")
|
@kotlin.SymbolName("Kotlin_io_Console_print")
|
||||||
external public fun print(message: String)
|
external public fun print(message: String)
|
||||||
|
|
||||||
/*
|
/* TODO: use something like that.
|
||||||
public fun print(message: Int) {
|
public fun<T> print(message: T) {
|
||||||
print(message.toString())
|
print(message.toString())
|
||||||
} */
|
} */
|
||||||
|
public fun print(message: Byte) {
|
||||||
|
print(message.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
public fun print(message: Short) {
|
||||||
|
print(message.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
public fun print(message: Char) {
|
||||||
|
print(message.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
public fun print(message: Int) {
|
||||||
|
print(message.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
public fun print(message: Long) {
|
||||||
|
print(message.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
public fun print(message: Float) {
|
||||||
|
print(message.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
public fun print(message: Double) {
|
||||||
|
print(message.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
public fun print(message: Boolean) {
|
||||||
|
print(message.toString())
|
||||||
|
}
|
||||||
|
|
||||||
@kotlin.SymbolName("Kotlin_io_Console_println")
|
@kotlin.SymbolName("Kotlin_io_Console_println")
|
||||||
external public fun println(message: String)
|
external public fun println(message: String)
|
||||||
|
|
||||||
|
// TODO: enable, once override by name is implemented.
|
||||||
|
public fun println(message: Byte) {
|
||||||
|
println(message.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
public fun println(message: Short) {
|
||||||
|
println(message.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
public fun println(message: Char) {
|
||||||
|
println(message.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
public fun println(message: Int) {
|
||||||
|
println(message.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
public fun println(message: Long) {
|
||||||
|
println(message.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
public fun println(message: Float) {
|
||||||
|
println(message.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
public fun println(message: Double) {
|
||||||
|
println(message.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
public fun println(message: Boolean) {
|
||||||
|
println(message.toString())
|
||||||
|
}
|
||||||
|
/* TODO: use something like that.
|
||||||
|
public fun<T> println(message: T) {
|
||||||
|
print(message.toString())
|
||||||
|
} */
|
||||||
|
|
||||||
@kotlin.SymbolName("Kotlin_io_Console_println0")
|
@kotlin.SymbolName("Kotlin_io_Console_println0")
|
||||||
external public fun println()
|
external public fun println()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user