Files
kotlin-fork/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt
T
Kirill Rakhman bd9f36ad01 [FIR] Move type parameter scope above member and static scopes in tower
This fixes a false positive TYPE_PARAMETER_IS_NOT_AN_EXPRESSION when
a type parameter and some member, static or companion declaration have
the same name and referred to inside a class.

#KT-58028 Fixed
2023-04-27 13:59:13 +00:00

46 lines
757 B
Kotlin
Vendored

//ALLOW_AST_ACCESS
package test
class ConstructorTypeParamClassObjectTypeConflict<test> {
companion object {
interface test
}
val some: test? = throw Exception()
}
class ConstructorTypeParamClassObjectConflict<test> {
companion object {
val test = { 12 }()
}
val some = test
}
class TestConstructorParamClassObjectConflict(test: String) {
companion object {
val test = { 12 }()
}
val some = test
}
class TestConstructorValClassObjectConflict(val test: String) {
companion object {
val test = { 12 }()
}
val some = test
}
class TestClassObjectAndClassConflict {
companion object {
val bla = { 12 }()
}
val bla = { "More" }()
val some = bla
}