-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of software
Description
| Previous ID | SR-11153 |
| Radar | rdar://problem/53257826 |
| Original Reporter | Qbyte (JIRA User) |
| Type | Bug |
| Status | Resolved |
| Resolution | Done |
Environment
Xcode 11.0 beta 3, beta 4 and beta 5 using "Swift 5" as "Swift Language Version"
Additional Detail from JIRA
| Votes | 2 |
| Component/s | Compiler |
| Labels | Bug, CompilerCrash |
| Assignee | None |
| Priority | Medium |
md5: 1cfc1409d7950524b30cb3f47f9f9e83
Issue Description:
The following code produces a Segmentation fault: 11:
protocol VectorSpace {
associatedtype Field: FieldAlgebra
}
protocol FieldAlgebra: VectorSpace where Self.Field == Self {
associatedtype ComparableSubalgebra: ComparableFieldAlgebra
static var zero: Self { get }
}
protocol ComparableFieldAlgebra: FieldAlgebra where Self.ComparableSubalgebra == Self {
}
func test<F: FieldAlgebra>(_ f: F) {
_ = F.ComparableSubalgebra.zero
}It still produces the Segmentation fault if you change the protocol FieldAlgebra to
protocol FieldAlgebra: VectorSpace {
typealias Field = Self
associatedtype ComparableSubalgebra: ComparableFieldAlgebra
static var zero: Self { get }
}Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of software