Files
swift-mirror/test/NameBinding/Inputs/overload_vars.swift
Doug Gregor 8592d9008f Don't apply module-shadowing rules to protocol members.
It's common for a requirement in a protocol and an implementation of that
requirement in a protocol extension to have the same
signature. Overload resolution prefers the requirement (which
dispatches dynamically), but that was being subverted by the shadowing
rules when the protocol came from an imported module and the extension
was in the current module. Fixes rdar://problem/21739333.

Swift SVN r30598
2015-07-24 22:55:20 +00:00

17 lines
304 B
Swift

public var something : Int = 1
public var ambiguousWithVar : Int = 2
public var scopedVar : Int = 3
public var localVar : Int = 4
public var scopedFunction : Int = 5
public var typeNameWins : Int = 6
public protocol HasFoo {
var foo: Int { get }
}
public protocol HasBar {
var bar: Int { get }
}