mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add a guard to make sure we don't attempt to check for Copyable conformance if the type contains type variables. This matches the existing behavior where we won't check for unbound generic types. Neither behavior is correct since we won't do the proper check once the generic type is opened, but this at least makes the behavior consistent and fixes the crash. It's also a very low risk fix that can be cherry-picked. rdar://152287178
6 lines
336 B
Swift
6 lines
336 B
Swift
// {"kind":"typecheck","signature":"checkRequirementsImpl(llvm::ArrayRef<swift::Requirement>, bool)","signatureAssert":"Assertion failed: (!firstType->hasTypeVariable()), function checkRequirementsImpl"}
|
|
// RUN: not %target-swift-frontend -typecheck %s
|
|
struct a<b: ~Copyable
|
|
extension a: Copyable where b: Copyable
|
|
let c (a -> d
|