Please can we keep private @dynamicMemberLookup?

My intent when introducing this diagnostic was to solve a swiftinterface issue, but I think the restriction is generally justified because as you say the attribute is as visible as the type. There are other similar attributes like @resultBuilder that imply the type implements some interface and the declaration checker requires that interface to be as accessible as the type and this seems very similar to me.

We could solve the swiftinterface issue a different way if necessary, but before we do that I’d like some confirmation that allowing a less visible implementation of @dynamicMemberLookup was an intentional feature rather than a longstanding oversight.

2 Likes