Files
kotlin/compiler/testData/diagnostics/tests/declarationChecks/localFunctionNoInheritVisibility.kt
Mikhail Glukhikh 4bd48c4796 Regular modifier checker implemented (initial version). A set of tests fixed accordingly.
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).
2015-08-03 19:41:50 +03:00

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()
}