Static dynamicMemberLookup

static dynamic member lookup doesn’t work for unprefixed “dot” syntax

This seems to be the case here. It works with regular static properties though. On the other hand regular static subscripts don't work without specifying the type as well, so maybe this is an expected behaviour for dynamic member lookup too.
In my case it would be a nice thing to have as it would allow to have a nice syntax for url builder I'm working on, i.e. /.repo/.string that would match "/repo/apple" url path. Without that I have to do a workaround by adding an empty path component (using ExpressibleByStringLiteral) to "lift" it from type to instance: ""/.repo/.string.

2 Likes