Files
swift-mirror/test/IDE/Inputs/multiple-files-1.swift
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

6 lines
143 B
Swift

var fooObject: FooStruct = FooStruct()
var genericFooObject: GenericFooStruct = GenericFooStruct<Void>()
private func privateFunc_ERROR() {}