Skip to content

Crash when type of closure has superclass-bound existential containing a function type containing a type parameter #62061

@slavapestov

Description

@slavapestov
class C<T> {}

protocol P {}

protocol Q {
  associatedtype A
}

func foo<T: Q>(t: T) {
  let fn: (any P & C<(T.A) -> ()>) -> T = { x in t }
}

Metadata

Metadata

Assignees

Labels

SILGenArea → compiler: The SIL generation stagebugA deviation from expected or documented behavior. Also: expected but undesirable behavior.closuresFeature: closurescompilerThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareexpressionsFeature: expressionsgenericsFeature: generic declarations and typesprotocol compositionsFeature → types: protocol composition typestypesFeature: types

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions