Jorrit
08/12/2020, 2:20 PMclass Base() {
class Nested() {
}
}
funWithCtor(::Base) // works
funWithCtor(::Base.Nested) // doesn't work
funWithCtor(::Nested) // works if: import Outer.NestedMarc Knaup
08/12/2020, 2:21 PMBase::NestedJorrit
08/12/2020, 2:25 PMdiesieben07
08/12/2020, 2:31 PMMarc Knaup
08/12/2020, 2:32 PMJorrit
08/12/2020, 2:35 PMfun funWithCtor(ctor: KFunction1<Param, ReturnType>) {
// ...
}Jorrit
08/12/2020, 2:36 PMMarc Knaup
08/12/2020, 2:37 PMBase in your example, because KFunction1 expects 1 parameter. Neither Base() nor Base.Nested() have a parameter.diesieben07
08/12/2020, 2:37 PMJorrit
08/12/2020, 2:38 PMJorrit
08/12/2020, 2:43 PMMarc Knaup
08/12/2020, 2:44 PMinner class somewhere?Jorrit
08/12/2020, 2:47 PMMarc Knaup
08/12/2020, 2:48 PMJorrit
08/12/2020, 2:48 PMMarc Knaup
08/12/2020, 2:49 PMMarc Knaup
08/12/2020, 2:50 PMJorrit
08/12/2020, 2:51 PMJorrit
08/12/2020, 2:52 PMMarc Knaup
08/12/2020, 2:53 PMOuter::Nested::invoke works 🤔Jorrit
08/12/2020, 3:10 PM