Updated test data and stdlib sources.
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
|
||||
package kt1219
|
||||
|
||||
fun <T, R> Iterable<T>.fold(var r: R, op: (T, R) -> R) : R {
|
||||
fun <T, R> Iterable<T>.fold(a: R, op: (T, R) -> R) : R {
|
||||
var r = a
|
||||
this.foreach { r = op(it, r) } //unused value here
|
||||
return r
|
||||
}
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
package kt609
|
||||
|
||||
fun test(var a: Int) {
|
||||
a = <!UNUSED_VALUE!>324<!> //should be an 'unused value' warning here
|
||||
fun test(a: Int) {
|
||||
var <!ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE!>aa<!> = a
|
||||
aa = <!UNUSED_VALUE!>324<!> //should be an 'unused value' warning here
|
||||
}
|
||||
|
||||
class C() {
|
||||
@@ -16,4 +17,4 @@ open class A() {
|
||||
|
||||
class B() : A() {
|
||||
final override fun foo(s : String) {} //should not be a warning
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user