dbl -> toDouble

This commit is contained in:
Alex Tkachman
2012-02-22 13:14:41 +02:00
parent 18990e2c1b
commit 53bba59a4f
79 changed files with 335 additions and 298 deletions
@@ -1,5 +1,5 @@
fun StringBuilder.takeFirst(): Char {
if (this.length() == 0) return 0.char
if (this.length() == 0) return 0.toChar()
val c = this.charAt(0)
this.deleteCharAt(0)
return c
@@ -8,7 +8,7 @@ fun StringBuilder.takeFirst(): Char {
fun foo(expr: StringBuilder): Int {
val c = expr.takeFirst()
when(c) {
0.char -> throw Exception("zero")
0.toChar() -> throw Exception("zero")
else -> throw Exception("nonzero" + c)
}
}