fix: lambda now have correct closure
This commit is contained in:
1 parent
306a7f26ef
commit
c0cf190452
8 files changed
+239
-57
No files matched your search
@@ -1167,6 +1167,7 @@ class ScriptTest {
|
||||
eval(
|
||||
"""
|
||||
fun mapValues(iterable, transform) {
|
||||
println("start: ", transform)
|
||||
var result = []
|
||||
for( x in iterable ) result += transform(x)
|
||||
}
|
||||
@@ -1238,6 +1239,17 @@ class ScriptTest {
|
||||
assert( 5 <=> 7 < 0 )
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun simpleClassDelaration() = runTest {
|
||||
eval( """
|
||||
// class Vec2(x,y)
|
||||
// println(Vec2(1,2)::class)
|
||||
println("---------------------")
|
||||
println(Int::class)
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user