Commit Graph

5 Commits

Author SHA1 Message Date
Hamish
dee1590ae2 [Sema] Fix several redeclaration checking bugs
Currently we only give subscripts and var decls custom overload types if they're in generic extensions. However, because we give them no custom overload type in any other case, we don't detect for example a conflict with a previous declaration in the body of the extended type.

This commit changes the overload type logic such that properties and subscripts are always given custom overload types, which is determined by:

- The interface type of the decl (for subscripts only; as variables cannot be overloaded by type)
- The 'self' type of the context, if any
- The generic signature of the context, if any

Additionally, this commit adds a new `swift::conflicting` overload to ensure that different declarations always conflict even if their overload types are different.

Resolves SR-7249, SR-7250 & SR-7251.
2018-03-22 11:42:29 +00:00
Argyrios Kyrtzidis
9f8641f90e [IDE/CodeCompletion] Fix crash when picking up declarations from the protocol conformances
of a type declared in a non-primary source file.

rdar://18583883

Swift SVN r22689
2014-10-11 05:07:38 +00:00
Jordan Rose
67536dbb8a Respect access control in visible decl lookup (and code completion).
<rdar://problem/17648922>

Swift SVN r19963
2014-07-14 23:02:41 +00:00
Ted Kremenek
fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00
Argyrios Kyrtzidis
df86c54874 [IDE] Rename test/CodeCompletion -> test/IDE
Swift SVN r6842
2013-08-02 17:03:21 +00:00