AbstractStringBuilder, StringBuilder and java.io.File annotated with nullable/notnull
This commit is contained in:
@@ -75,7 +75,7 @@ fun join(x : Int, vararg a : String) : String {
|
||||
for (s in a) {
|
||||
b.append(s)
|
||||
}
|
||||
return b.toString()!!
|
||||
return b.toString()
|
||||
}
|
||||
|
||||
fun <T> joinG(x : Int, vararg a : T) : String {
|
||||
@@ -83,7 +83,7 @@ fun <T> joinG(x : Int, vararg a : T) : String {
|
||||
for (s in a) {
|
||||
b.append(s)
|
||||
}
|
||||
return b.toString()!!
|
||||
return b.toString()
|
||||
}
|
||||
|
||||
fun <T> joinT(<!UNUSED_PARAMETER!>x<!> : Int, vararg <!UNUSED_PARAMETER!>a<!> : T) : T? {
|
||||
|
||||
@@ -52,7 +52,7 @@ fun main(args: Array<String>) {
|
||||
System.out.println("Your numbers: " + prompt)
|
||||
System.out.println("Enter your expression:")
|
||||
val reader = BufferedReader(InputStreamReader(System.`in`))
|
||||
val expr = StringBuilder(reader.readLine())
|
||||
val expr = StringBuilder(reader.readLine()!!)
|
||||
try {
|
||||
val result = evaluate(expr, numbers)
|
||||
if (result != 24)
|
||||
|
||||
Reference in New Issue
Block a user