GreatSyntacticShift: Codegen testdata fixed
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
fun isZero(x: Int) = when(x) {
|
||||
0 => true
|
||||
else => false
|
||||
0 -> true
|
||||
else -> false
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
fun isZero(x: Int) = when(x) {
|
||||
0 => true
|
||||
0 -> true
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
fun typeName(a: Any?) : String {
|
||||
return when(a) {
|
||||
is java.util.ArrayList<*> => "array list"
|
||||
else => "no idea"
|
||||
is java.util.ArrayList<*> -> "array list"
|
||||
else -> "no idea"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
fun isString(x: Any) = when(x) {
|
||||
is String => "string"
|
||||
else => "something"
|
||||
is String -> "string"
|
||||
else -> "something"
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@ fun isDigit(a: Int) : String {
|
||||
aa.add(239)
|
||||
|
||||
return when(a) {
|
||||
in aa => "array list"
|
||||
in 0..9 => "digit"
|
||||
!in 0..100 => "not small"
|
||||
else => "something"
|
||||
in aa -> "array list"
|
||||
in 0..9 -> "digit"
|
||||
!in 0..100 -> "not small"
|
||||
else -> "something"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
fun isDigit(a: Char) = when(a) {
|
||||
in '0'..'9' => "digit"
|
||||
else => "something"
|
||||
in '0'..'9' -> "digit"
|
||||
else -> "something"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user