Files
swift-mirror/test/refactoring/TrailingClosure/rdar81106400.swift
Hamish Knight 40e20a270d Don't apply "Convert to Trailing Closure" to call with multiple trailing closures
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
2021-07-26 17:15:22 +01:00

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