Commits
Chris Lattner committed babcbe0c76e
fix a bug in the type checker handling references to instance methods with metatype
bases. Consider this example (reduced from NameBinding/name_lookup.swift):
class ThisBase1 {
func baseFunc0() {}
}
class ThisDerived1 : ThisBase1 {
class func staticTestSelf1(a : ThisBase1) {
let x = self.baseFunc0
x(a)()
}
}
The type checker was incorrectly blasting over the self type of the 'self.baseFunc0'
reference, giving 'x' a type of "ThisDerived -> () -> ()" instead of the correct
type of "ThisBase -> () -> ()" and rejecting the testcase.
I'm not confident that this is the right fix, review greatly appreciated!
Swift SVN r30641