mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 00:21:32 +00:00
Most of modifier diagnostic is expressed by REDUNDANT_MODIFIER, INCOMPATIBLE_MODIFIERS, REPEATED_MODIFIER, WRONG_MODIFIER_TARGET, WRONG_MODIFIER_PARENT. A set of modifier diagnostics is not in use now (but not deleted yet).
17 lines
241 B
Kotlin
Vendored
17 lines
241 B
Kotlin
Vendored
package d
|
|
|
|
class T {
|
|
fun baz() = 1
|
|
}
|
|
|
|
<!WRONG_MODIFIER_TARGET!>override<!> fun zzz() {}
|
|
|
|
fun foo(t: T) {
|
|
<!WRONG_MODIFIER_TARGET!>override<!> fun T.baz() = 2
|
|
|
|
// was "Visibility is unknown yet exception"
|
|
t.baz()
|
|
|
|
zzz()
|
|
}
|