Switch the stdlib to use #file instead of __FILE__, and deprecate the __FILE__ identifiers.

This also updates the tests that would otherwise fail.
This commit is contained in:
Chris Lattner
2016-02-04 15:07:27 -08:00
parent 7f77733b0c
commit 0619e57a61
21 changed files with 164 additions and 139 deletions

View File

@@ -48,8 +48,8 @@ func rejectsAssertStringLiteral() {
// <rdar://problem/22243469> QoI: Poor error message with throws, default arguments, & overloads
func process(line: UInt = __LINE__, _ fn: () -> Void) {}
func process(line: UInt = __LINE__) -> Int { return 0 }
func process(line: UInt = #line, _ fn: () -> Void) {}
func process(line: UInt = #line) -> Int { return 0 }
func dangerous() throws {}
func test() {