do extension functions work the same on enums as o...
# getting-started
j
do extension functions work the same on enums as on other classes?
as in, I expect to be able to define:
Copy code
enum class A {
ONE,
TWO
}

fun A?.transform() {
}
but I cannot seem to be able to call
transform()
on an instance of enum
A
ok, figured out the problem - had defined the extension function next to the enum but still inside the parent class, so Kotlin didn't export the function as I expected
👍 2