KT-1388 Parse static final fields from java binary classes as non-null

#KT-1388 Fixed
This commit is contained in:
Stepan Koltsov
2012-05-13 00:53:37 +04:00
parent ae58c1c888
commit 8c8ed3a1ee
28 changed files with 80 additions and 50 deletions
@@ -38,7 +38,7 @@ fun evaluate(expr: StringBuilder, numbers: ArrayList<Int>): Int {
}
fun main(args: Array<String>) {
System.out?.println("24 game")
System.out.println("24 game")
val numbers = ArrayList<Int>(4)
val rnd = Random();
val prompt = StringBuilder()
@@ -48,18 +48,18 @@ fun main(args: Array<String>) {
if (i > 0) prompt.append(" ");
prompt.append(n)
}
System.out?.println("Your numbers: " + prompt)
System.out?.println("Enter your expression:")
System.out.println("Your numbers: " + prompt)
System.out.println("Enter your expression:")
val reader = BufferedReader(InputStreamReader(System.`in`))
val expr = StringBuilder(reader.readLine())
try {
val result = evaluate(expr, numbers)
if (result != 24)
System.out?.println("Sorry, that's " + result)
System.out.println("Sorry, that's " + result)
else
System.out?.println("You won!");
System.out.println("You won!");
}
catch(e: Throwable) {
System.out?.println(e.getMessage())
System.out.println(e.getMessage())
}
}
+1 -1
View File
@@ -11,7 +11,7 @@ val items: ArrayList<Item> = ArrayList<Item>
fun test(room : Object) {
for(val item: Item in items) {
if (item.room === room) {
System.out?.println("You see " + item.name)
System.out.println("You see " + item.name)
}
}
}