Commits
Doug Gregor committed 1e6b445caea
Teach normal name lookup to find members of protocol extensions.
We do a silly little dance here of finding all of the members of
protocols and their extensions, then deleting the protocol members. In
the future, this is the place where we should handle the protocol
requirement -> witness mapping, including handling derived
conformances.
Basic protocol extensions seem to be working now:
extension SequenceType {
var myCount: Int {
var result = 0
for x in self {
++result
}
return result
}
}
println(["a", "b", "c", "d"].myCount) // 4, duh
Swift SVN r26617