Files
swift-mirror/validation-test/compiler_crashers_2_fixed/1e0e4ce6cf612c7b.swift
Hamish Knight 7629fbd0e0 [Sema] Quick fix for non-copyable type resolution crash
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
2025-10-16 20:34:38 +01:00

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