separate compiler and plugin tests
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
fun StringBuilder.takeFirst(): Char {
|
||||
if (this.length() == 0) return 0.chr
|
||||
val c = this.charAt(0)
|
||||
this.deleteCharAt(0)
|
||||
return c
|
||||
}
|
||||
|
||||
fun foo(expr: StringBuilder): Int {
|
||||
val c = expr.takeFirst()
|
||||
when(c) {
|
||||
0.chr => throw Exception("zero")
|
||||
else => throw Exception("nonzero" + c)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user