KT-560 - no type coertion for fields

This commit is contained in:
Alex Tkachman
2011-11-22 09:09:51 +02:00
parent 5fa9cbdf76
commit 159865d751
3 changed files with 34 additions and 0 deletions
@@ -0,0 +1,28 @@
namespace while_bug_1
import java.io.*
open class AllEvenNum() {
class object {
open public fun main(args : Array<String?>?) : Unit {
var i : Int = 1
while ((i <= 100)) {
{
if (((i % 2) == 0))
{
System.out?.print((i.toString() + ","))
}
}
(i++)
}
}
}
}
fun box() : String {
AllEvenNum.main(Array<String?>(0))
return "OK"
}