TEST: Coercion to Unit and ++/-- tests. (#87)

This commit is contained in:
Nikolay Igotti
2016-11-27 11:22:54 +03:00
committed by GitHub
parent 29c0eda720
commit 3d2166410c
2 changed files with 37 additions and 0 deletions
@@ -0,0 +1,32 @@
fun simple() {
var a = 238
a++
println(a)
--a
println(a)
}
class Foo() {
var i = 29
fun more() {
i++
}
fun less() {
--i
}
}
fun fields() {
val foo = Foo()
foo.more()
println(foo.i)
foo.less()
println(foo.i)
}
fun main(args: Array<String>) {
simple()
fields()
}