mirror of
https://github.com/apple/swift.git
synced 2026-10-16 16:50:49 +02:00
This is not supported for the same reason you can't have a noncopyable variadic parameter, but the code was hard-coded to check for copyability only. Generalize this to apply the generic signature for Array via the common code path, and add a custom note to explain why those requirements are checked in the first place. Cleaning this up also fixed some fuzzer crashes. Reported on the forums: https://forums.swift.org/t/variadic-escapable-arguments-crash-the-compiler/86727/2
7 lines
374 B
Swift
7 lines
374 B
Swift
// {"kind":"typecheck","signature":"checkRequirementsImpl(llvm::ArrayRef<swift::Requirement>, bool)","signatureAssert":"Assertion failed: (!firstType->hasTypeVariable()), function checkRequirementsImpl","signatureNext":"checkConformance"}
|
|
// RUN: not %target-swift-frontend -typecheck %s
|
|
struct a<b: ~Copyable
|
|
extension a: Copyable where b: Copyable
|
|
let c 0 as a
|
|
...
|