dave08
11/14/2021, 10:57 AMclass Foo(val bar: Bar)
class Bar(val baz: String)
val foo = Foo(Bar("baz"))
// why isn't this possible?
val bazGetter = Foo::bar::baz
// whereas this is ok?
val bazGetter2: (Foo) -> String = { it.bar.baz }
Joffrey
11/14/2021, 11:10 AMBar::baz
but not in the context of a particular Foo
dave08
11/14/2021, 11:40 AMFoo::bar::baz
would be the equivalent to Bar:baz
as the description of the property the Foo::
being used just to traverse to it... but I guess that wouldn't make sense when the lambda interpretation is different...smit01
11/14/2021, 2:35 PMdave08
11/14/2021, 2:44 PMget(Foo::prop)
function, to avoid get { it.bar.baz }
which goes through the source files to get the name..., but thanks anyways!ephemient
11/15/2021, 5:38 AM