https://kotlinlang.org logo
Title
b

benleggiero

07/09/2018, 3:20 AM
Is this a bug or intended behavior?
class Foo {
    companion object
}

typealias Bar = Foo

fun Foo.Companion.hoge() = "hoge" // Okay
fun Bar.Companion.qux() = "qux" // ERROR: Unresolved reference: Companion
k

karelpeeters

07/09/2018, 6:52 AM
Where do
qux
and
hoge
come from?
They're new function definitions of course
h

hho

07/09/2018, 9:41 AM
Also, since when does Kotlin have a
func
keyword? 😉
b

benleggiero

07/09/2018, 4:32 PM
Thanks, @hho. I use Swift at work and muscle memory gets confused sometimes 😒imple_smile:
h

hho

07/09/2018, 5:15 PM
Ah, so that's where that came from. 🙂 Regarding the original question – I think it might be this bug: https://youtrack.jetbrains.com/issue/KT-15298
1