FIR checker: Report VAL_OR_VAR_ON_*_PARAMETER.
This commit is contained in:
committed by
teamcityserver
parent
71c5c9f6c5
commit
af99ad0736
-13
@@ -1,13 +0,0 @@
|
||||
fun f() {
|
||||
try {
|
||||
} catch (val e: Exception) {
|
||||
}
|
||||
|
||||
try {
|
||||
} catch (var e: Exception) {
|
||||
}
|
||||
|
||||
try {
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
fun f() {
|
||||
try {
|
||||
} catch (<!VAL_OR_VAR_ON_CATCH_PARAMETER!>val<!> e: Exception) {
|
||||
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
class Pair {
|
||||
operator fun component1(): Int = null!!
|
||||
operator fun component2(): Int = null!!
|
||||
}
|
||||
|
||||
class Coll {
|
||||
operator fun iterator(): It = It()
|
||||
}
|
||||
|
||||
class It {
|
||||
operator fun next() = Pair()
|
||||
operator fun hasNext() = false
|
||||
}
|
||||
|
||||
|
||||
fun f() {
|
||||
for (val i in 1..4) {
|
||||
|
||||
}
|
||||
|
||||
for (var i in 1..4) {
|
||||
|
||||
}
|
||||
|
||||
for (val (i,j) in Coll()) {
|
||||
|
||||
}
|
||||
|
||||
for (var (i,j) in Coll()) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
class Pair {
|
||||
operator fun component1(): Int = null!!
|
||||
operator fun component2(): Int = null!!
|
||||
|
||||
Reference in New Issue
Block a user