Is this a bug or intended behavior? ``` class Foo...
# getting-started
b
Is this a bug or intended behavior?
Copy code
class Foo {
    companion object
}

typealias Bar = Foo

fun Foo.Companion.hoge() = "hoge" // Okay
fun Bar.Companion.qux() = "qux" // ERROR: Unresolved reference: Companion
k
Where do
qux
and
hoge
come from?
They're new function definitions of course
h
Also, since when does Kotlin have a
func
keyword? 😉
b
Thanks, @hho. I use Swift at work and muscle memory gets confused sometimes simple smile
h
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