"Unused value" error added to existed tests
This commit is contained in:
@@ -2,5 +2,5 @@ fun test() {
|
||||
var a : Any? = null
|
||||
if (a is Any) else a = null;
|
||||
while (a is Any) a = null
|
||||
while (true) a = null
|
||||
while (true) a = <warning>null</warning>
|
||||
}
|
||||
@@ -2,7 +2,7 @@ fun foo(u : Unit) : Int = 1
|
||||
|
||||
fun test() : Int {
|
||||
foo(<error>1</error>)
|
||||
val a : fun() : Unit = {
|
||||
val <warning>a</warning> : fun() : Unit = {
|
||||
foo(<error>1</error>)
|
||||
}
|
||||
return 1
|
||||
|
||||
@@ -32,7 +32,7 @@ fun evaluateAdd(expr: StringBuilder, numbers: ArrayList<Int>): Int {
|
||||
fun evaluate(expr: StringBuilder, numbers: ArrayList<Int>): Int {
|
||||
val lhs = evaluateAdd(expr, numbers)
|
||||
if (expr.length() > 0) {
|
||||
val c = expr.charAt(0)
|
||||
val <warning>c</warning> = expr.charAt(0)
|
||||
expr.deleteCharAt(0)
|
||||
}
|
||||
return lhs
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
fun foo1() : fun (Int) : Int = { (x: Int) => x }
|
||||
|
||||
fun foo() {
|
||||
val h : fun (Int) : Int = foo1();
|
||||
val <warning>h</warning> : fun (Int) : Int = foo1();
|
||||
h(1)
|
||||
val m : fun (Int) : Int = {(a : Int) => 1}//foo1()
|
||||
val <warning>m</warning> : fun (Int) : Int = {(a : Int) => 1}//foo1()
|
||||
m(1)
|
||||
}
|
||||
@@ -18,5 +18,5 @@ enum class Foo<T> {
|
||||
|
||||
|
||||
fun box() {
|
||||
val x: ProtocolState = ProtocolState.WAITING
|
||||
val <warning>x</warning>: ProtocolState = ProtocolState.WAITING
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
bar = 1
|
||||
this.bar
|
||||
1 : Int
|
||||
val a : Int =1
|
||||
val <warning>a</warning> : Int =1
|
||||
this : Foo
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user