Correct, what I actually have is this list initial...
# announcements
j
Correct, what I actually have is this list initialization which of course happens outside of the constructor of MyClass
k
Can you show the code?
j
sure
something like
Copy code
class MyClass (
    private val transitions: List<Transition> = listOf(

        Transition(Pair(Status.X, Status.Y),
            beforeTransition = asList(this::fun1),
            afterTransition = asList()
        ),
...
k
And that doesn't compile?
j
no, it says 'this' is not defined in this context
using private var transitions: List<Transition> and init { transitions = listOf(...) } of course works fine with this::fun1
k
That's really strange, I'll experiment a bit later today.