forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Syntax] Make FunctionTypeSyntax use a FunctionParameterList (swiftla…
…ng#8270) * Made FunctionType use a FunctionParameterList instead of TupleTypeElementList * Added round-trip test * Removed unused test variables
- Loading branch information
1 parent
f6b0542
commit d90032c
Showing
9 changed files
with
61 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// 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) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters