Files
swift-mirror/test/TBD/function.swift
T
Slava Pestov f2b2cd4019 TBD: Test default argument behavior in Swift 3 and 4 mode
Also, bail out before emitting any default argument generators in Swift 4
mode. This is NFC, because we already check the linkage of the SILDeclRef
and skip it if its not public. But adding the check explicitly here
serves as a reminder that this entire code block can be deleted if we
ever decide to kill off Swift 3 compatibility.
2018-01-14 22:59:41 -08:00

15 lines
642 B
Swift

// RUN: %target-swift-frontend -emit-ir -o- -parse-as-library -module-name test -validate-tbd-against-ir=all -swift-version 3 %s
// RUN: %target-swift-frontend -emit-ir -o- -parse-as-library -module-name test -validate-tbd-against-ir=all -swift-version 4 %s
public func publicNoArgs() {}
public func publicSomeArgs(_: Int, x: Int) {}
public func publicWithDefault(_: Int = 0) {}
internal func internalNoArgs() {}
internal func internalSomeArgs(_: Int, x: Int) {}
internal func internalWithDefault(_: Int = 0) {}
private func privateNoArgs() {}
private func privateSomeArgs(_: Int, x: Int) {}
private func privateWithDefault(_: Int = 0) {}