Commits

Chris Lattner committed d5aaf13e04e
fix <rdar://problem/21459429> QoI: Poor compilation error calling assert This teaches overload constraint diagnosis to look at the resolved anchor expression that fails (instead of assuming that it is the expr itself) and walks up the AST to find the applyexpr in question. This allows us to give much more specific diagnostics for overload resolution failures, and to give much more specific location information. Where before my recent patches we used to produce: t.swift:2:3: error: cannot invoke 'assert' with an argument list of type '(Bool, String)' assert(a != nil, "ASSERT COMPILATION ERROR") ^ t.swift:2:9: note: expected an argument list of type '(@autoclosure () -> Bool, @autoclosure () -> String, file: StaticString, line: UWord)' assert(a != nil, "ASSERT COMPILATION ERROR") ^ with this and the other recent patches, we now produce: t.swift:2:12: error: cannot invoke '!=' with an argument list of type '(Int, nil)' assert(a != nil, "ASSERT COMPILATION ERROR") ~~^~~~~~ Swift SVN r29792