fix #11 and private visibility for constructor params, fields and methods.
This commit is contained in:
1 parent
fffa3d31bb
commit
20c81dbf2e
9 files changed
+212
-63
No files matched your search
@@ -1453,4 +1453,15 @@ class ScriptTest {
|
||||
assertEquals(sqrt(109), p.length())
|
||||
""".trimIndent())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testPrivateConstructorParams() = runTest {
|
||||
val c = Context()
|
||||
c.eval("""
|
||||
class Point(private var x,y)
|
||||
val p = Point(1,2)
|
||||
p.y = 101
|
||||
assertThrows() { p.x = 10 }
|
||||
""")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user