Add simple checker tests for scripts
This commit is contained in:
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
val c = true
|
||||
if (c) {
|
||||
2 + 3
|
||||
}
|
||||
|
||||
fun f() {
|
||||
if (!c) {
|
||||
3 + 4
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package org.my
|
||||
|
||||
val x = 1
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
fun f() {
|
||||
}
|
||||
|
||||
fun g() {
|
||||
f()
|
||||
}
|
||||
|
||||
val c = 1
|
||||
|
||||
1 + 2
|
||||
|
||||
val k = f()
|
||||
|
||||
3 + 5
|
||||
|
||||
g()
|
||||
f()
|
||||
|
||||
class C {
|
||||
fun f() {
|
||||
}
|
||||
}
|
||||
|
||||
val cc = C()
|
||||
|
||||
cc.f()
|
||||
@@ -0,0 +1,2 @@
|
||||
val x = <error descr="[UNINITIALIZED_VARIABLE] Variable 'y' must be initialized">y</error>
|
||||
val y = 3
|
||||
Reference in New Issue
Block a user