-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
assertion failureBug → crash: An assertion failureBug → crash: An assertion failurebugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.call expressionsFeature → expressions: Call expressionsFeature → expressions: Call expressionsclosuresFeature: closuresFeature: closurescompilerThe Swift compiler itselfThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of softwareexpressionsFeature: expressionsFeature: expressionsgenericsFeature: generic declarations and typesFeature: generic declarations and typespack expansionsFeature → expressions: Pack expansion expressionsFeature → expressions: Pack expansion expressionsparameter packsFeature → generics: Parameter packsFeature → generics: Parameter packsswift 6.0type checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysisverifier
Description
class Thing<T> {
var value: T
init(_ value: T) { self.value = value }
func combineThings<each U>(head: Thing<T>, tail: repeat Thing<each U>) {
repeat (each tail).doSomething(each tail) { _ in }
}
func doSomething(_ value: AnyObject, closure: @escaping (T) -> Void) {}
}
This crashes on latest nightly (Swift version 5.11-dev (LLVM 82306b901067e3c, Swift cabb5e109fa373f)
) with:
Archetype τ_2_0 not allowed in this context
Archetype generic signature: <τ_0_0, each τ_1_0, τ_2_0>
Context generic signature: <T, each U>
and further down it says
Program crashed: Bad pointer dereference at 0x0000000000000000
Similar crash on 5.9 too.
Metadata
Metadata
Assignees
Labels
assertion failureBug → crash: An assertion failureBug → crash: An assertion failurebugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.call expressionsFeature → expressions: Call expressionsFeature → expressions: Call expressionsclosuresFeature: closuresFeature: closurescompilerThe Swift compiler itselfThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of softwareexpressionsFeature: expressionsFeature: expressionsgenericsFeature: generic declarations and typesFeature: generic declarations and typespack expansionsFeature → expressions: Pack expansion expressionsFeature → expressions: Pack expansion expressionsparameter packsFeature → generics: Parameter packsFeature → generics: Parameter packsswift 6.0type checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysisverifier