bd9f36ad01
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
46 lines
757 B
Kotlin
Vendored
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
|
|
}
|