Commits

Doug Gregor committed 5e0a7ac2e32
If an assumption that binds a type variable to a class type fails, try binding to its superclass instead. This, plus a tiny hack to deal with our utter lack of meet/join computation, lets us define a ternary operator-like function as func ternary<T>(cond : Bool, ifTrue : [auto_closure] () -> T, ifFalse : [auto_closure] () -> T) -> T {} and call it with values of different class types, e.g., ternary(something, b, c) and the type checker will deduce the common base class of b and c. Swift SVN r2747