mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Within an extension, references to other members of the extended type are permitted without qualification. This is intended to work even when the extended type was a nested type, although members of the enclosing type are /not/ visible in this case. In order to implement this, the type checker pre-checks to see if there are /any/ members with this name and then rewrites the unqualified reference to a qualified one, based on an unresolved TypeExpr with the name of the enclosing type. Unfortunately, if the enclosing type is a nested type, that isn't going to work very well---we find the correct declaration, but fail to map it into context by virtue of not realizing where it came from. Fix this by explicitly checking for this case. https://bugs.swift.org/browse/SR-3847