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
+2 -2
View File
@@ -25,6 +25,6 @@ val d = b.<error>x</error>
val s = <error>System</error> // error
fun test() {
System.out?.println()
java.lang.System.out?.println()
System.out.println()
java.lang.System.out.println()
}
+1 -1
View File
@@ -52,7 +52,7 @@ fun Int.foo() = this
fun main(args: Array<String>) {
System.out?.print(1)
System.out.print(1)
val command = parse("")
+3 -3
View File
@@ -7,8 +7,8 @@ fun test() {
a?.plus(1)
}
val out : java.io.PrintStream? = null//= System.out
val ins = System.`in`
val out : java.io.PrintStream? = null
val ins : java.io.InputStream? = null
out?.println()
ins?.read()
@@ -277,4 +277,4 @@ fun f9(a : Int?) : Int {
if (a != null)
return a
return 1
}
}
+1 -1
View File
@@ -33,7 +33,7 @@ fun test(<warning>l</warning> : java.util.List<Int>) {
// ...
}
catch(e: Exception) {
System.out?.println(e.getMessage())
System.out.println(e.getMessage())
}
PrintStream("sdf")
@@ -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)
}
}
}