FirPropertyAccessorChecker: add three new diagnostics
This commit is contained in:
-12
@@ -1,12 +0,0 @@
|
||||
// KT-11809 Assertion error when delegated property has getter
|
||||
|
||||
class A {
|
||||
val p1 by this
|
||||
get
|
||||
|
||||
var p2 by this
|
||||
get() = ""
|
||||
|
||||
operator fun getValue(a: Any?, p: Any?) = ""
|
||||
operator fun setValue(a: Any?, p: Any?, v: Any?) {}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// KT-11809 Assertion error when delegated property has getter
|
||||
|
||||
class A {
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
val a: Int by Delegate()
|
||||
get() = 1
|
||||
|
||||
class Delegate {
|
||||
operator fun getValue(t: Any?, p: KProperty<*>): Int {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
var a: Int by Delegate()
|
||||
get() = 1
|
||||
set(i) {}
|
||||
|
||||
class Delegate {
|
||||
operator fun getValue(t: Any?, p: KProperty<*>): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
operator fun setValue(t: Any?, p: KProperty<*>, i: Int) {}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
Reference in New Issue
Block a user