Files
kotlin-fork/compiler/testData/diagnostics/tests/modifiers/defaultModifier.kt
T
Mikhail Glukhikh 147bca3d22 Enum deprecated syntax detection implemented and integrated into DeclarationsChecker.
A lot of tests was changed to refactor deprecated syntax. Six new tests were added to check deprecated syntax detection.
Diagnostic for "enum entry uses deprecated super constructor": constructor is highlighted
Diagnostic for "enum entry uses deprecated or no delimiter".
One warning removed.
2015-05-15 16:13:34 +03:00

55 lines
897 B
Kotlin
Vendored

<!ILLEGAL_MODIFIER!>companion<!> class A {
companion object {
}
}
class B {
companion object
val c: Int = 1
}
class C {
companion object A {
}
}
class D {
companion object A {
<!COMPANION_OBJECT_NOT_ALLOWED!>companion<!> object {
}
}
}
<!ILLEGAL_MODIFIER!>companion<!> object G {
<!COMPANION_OBJECT_NOT_ALLOWED!>companion<!> object
}
<!ILLEGAL_MODIFIER!>companion<!> interface H {
companion object
}
class J {
companion object C {
<!COMPANION_OBJECT_NOT_ALLOWED!>companion<!> object
}
}
<!ILLEGAL_MODIFIER!>companion<!> enum class Enum {
E1,
E2;
companion object
}
<!ILLEGAL_MODIFIER!>companion<!> fun main() {
}
<!ILLEGAL_MODIFIER!>companion<!> var prop: Int = 1
<!ILLEGAL_MODIFIER!>companion<!> get
<!ILLEGAL_MODIFIER!>companion<!> set
class Z(<!ILLEGAL_MODIFIER!>companion<!> val c: Int)