You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following program crashes the compiler with an assertion failure (b5bd439):
trait P {
type T: SemiRegular
type U
fun t(_ x: T)
fun u(_ x: U)
}
trait Q: SemiRegular {
type V: P
property v: V { let }
}
type A<V: P & SemiRegular>: Q {
public let _v: V
public init (v: sink V) { &self._v = v }
public property v: V { yield _v }
public fun infix== (_ other: Self) -> Bool { self.v == other.v }
}
type B<W: Q>: Deinitializable {
public let w: W
public let tt: W.V.T
public memberwise init
public fun t(_ x: W.V.T) { w.v.t(x) }
public fun u(_ x: W.V.U) { w.v.u(x) }
}
conformance Array: P {
public typealias T = Element
public typealias U = Self.Position
public fun t(_ x: Element) {}
public fun u(_ x: Self.Position) {}
}
public fun main() {
let a = A(v: Array<Bool>())
let b = B(w: a, tt: true)
b.t(true)
b.u(1)
}
The failure occurs in AbstractTypeLayout.swift and it is due to the layout B<A<Array<Bool>>> containing an error type. This error type is produced by the specialization of the generic type, which occurs in TypedProgram.storage(of:), under the "FIXME" note.
The text was updated successfully, but these errors were encountered:
The following program crashes the compiler with an assertion failure (b5bd439):
Note: this program is adapted from this test.
The failure occurs in
AbstractTypeLayout.swift
and it is due to the layoutB<A<Array<Bool>>>
containing an error type. This error type is produced by the specialization of the generic type, which occurs inTypedProgram.storage(of:)
, under the "FIXME" note.The text was updated successfully, but these errors were encountered: