https://kotlinlang.org logo
#getting-started
Title
# getting-started
r

Rodrigo Silva

06/29/2022, 1:45 PM
Hello all. I'm trying to understand why it's giving error, and how to fix it
abstract class SomeClass {
abstract fun someFunction(someParameter: String) : List<String?>
}
suspend inline fun <reified T : SomeClass> otherFunction(): Return<T> {
val someAtt = T::someFunction("abc")
}
Copy code
error: 
left-hand side of callable referece cannot be a type parameter
r

ribesg

06/29/2022, 2:08 PM
You’re trying to call a member function of
SomeClass
without an instance of
SomeClass
.