Am a bit confused about this. I have an extension function like this:
public val <T : Comparable<T>> Entry<T>.firstKey : T get() = this.getKey(0)
This (and others) are defined in a dedicated EntryFuncs.kt file.
This works fine for most of my code but in a test class the compiler says ‘Unresolved reference: firstKey’.
However, if I copy and paste the above line as-is into my test Kotlin file at the top, it works :S
I thought it might be something to do with main vs. test classes, but if I move my test class into src/main/java, problem remains.
It’s like the compiler isn’t “seeing” the extension function from some classes.
Have tried to re-create a simpler example of my project layout to pin this down but can’t seem to.
Any help appreciated!
Alfie.