Files
swift-mirror/test/Syntax/round_trip_function.swift
Harlan d90032cc45 [Syntax] Make FunctionTypeSyntax use a FunctionParameterList (#8270)
* Made FunctionType use a FunctionParameterList instead of TupleTypeElementList

* Added round-trip test

* Removed unused test variables
2017-03-23 09:57:11 -04:00

17 lines
429 B
Swift

// RUN: %round-trip-syntax-test --swift-syntax-test %swift-syntax-test --file %s
func noArgs() {}
func oneArg(x: Int) {}
func oneUnlabelledArg(_ x: Int) {}
typealias FunctionAlias = (_ x: inout Int) -> Bool
typealias FunctionAliasNoLabel = (Int) -> Bool
func manyArgs(x: Int, y: Int, _ z: Bool, _ a: String) throws -> [Int] {
return []
}
func rethrowing(_ f: (Bool) throws -> Int) rethrows -> Int {
return try f(false)
}