I was trying some basics of kotlin ->
program :
fun createDate(day: Int, month: Int, year: Int, hour: Int = 0, minute: Int = 0, second: Int = 0) {
print("TEST", "$day-$month-$year $hour:$minute:$second")
}
createDate(1,7,1997)
error :
error: none of the following functions can be called with the arguments supplied:
@InlineOnly public inline fun print(message: Any?): Unit defined in kotlin.io
@InlineOnly public inline fun print(message: Boolean): Unit defined in kotlin.io
@InlineOnly public inline fun print(message: Byte): Unit defined in kotlin.io
@InlineOnly public inline fun print(message: Char): Unit defined in kotlin.io
@InlineOnly public inline fun print(message: CharArray): Unit defined in kotlin.io
@InlineOnly public inline fun print(message: Double): Unit defined in kotlin.io
@InlineOnly public inline fun print(message: Float): Unit defined in kotlin.io
@InlineOnly public inline fun print(message: Int): Unit defined in kotlin.io
@InlineOnly public inline fun print(message: Long): Unit defined in kotlin.io
@InlineOnly public inline fun print(message: Short): Unit defined in kotlin.io
print("TEST", "$day-$month-$year $hour:$minute:$second")
any idea what I am doing wrong, I was following this -> https://www.toptal.com/software/kotlin-android-language
print
only accepts a single argument, you're passing it two. – jonrsharpeprint
-function the author of that article used... probably it's a self-built one... – Roland