mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Previously we'd perform an invalid transform or hit an assertion failure. For now, disallow the transform for a call that already uses trailing closure syntax. rdar://81106400
10 lines
294 B
Swift
10 lines
294 B
Swift
func lottaClosures(x: () -> Void, y: () -> Void, z: () -> Void) {
|
|
lottaClosures(x: {}) {} z: {}
|
|
}
|
|
// RUN: not %refactor -trailingclosure -source-filename %s -pos=2:3
|
|
|
|
func singleClosure(x: () -> Void) {
|
|
singleClosure {}
|
|
}
|
|
// RUN: not %refactor -trailingclosure -source-filename %s -pos=7:3
|