Revisiting the source compatibility impact of SE-0274: Concise magic file names

+1 to this proposal, thanks @Douglas_Gregor.

Yeah that's one workaround. Unfortunately it requires the entire signature to be duplicated three times. This makes me wish we could do something like this in Swift:

func foo(
    #if compiler(>=5.3)
    file: String = #filePath
    #else
    file: String = #file
    #endif
)
2 Likes