Cannot use Array shorthand notation when calling single-param initializer with trailing closure #78843
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
Creating an array via an initializer that takes a trailing closure only compiles when using the explicit notation (i.e.
Array<T>
, but doesn't compile when using the shorthand notation (i.e.[T]
).If the initializer takes additional parameters prior to the trailing closure, both notations work fine.
Reproduction
Expected behavior
both should work
Environment
swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)
Target: arm64-apple-macosx15.0
Additional information
No response
The text was updated successfully, but these errors were encountered: