mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This was fixed by 897effe, which I had originally thought would be a
no-functionality-change commit because it just made things lazier.
Turns out requirement signature deserialization can result in
circularity with sufficiently cross-referential conformances.
This isn't exactly a reduced test case because it still depends on
subclassing NSObject, which probably means there are hidden
dependencies on conforming to standard library protocols. But it's
better than nothing.
https://bugs.swift.org/browse/SR-5191
15 lines
608 B
Swift
15 lines
608 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-build-swift -module-name SwiftCrash -emit-module -o %t/SR5191.swiftmodule %s %S/Inputs/SR5191-other.swift
|
|
// RUN: %target-build-swift -module-name SwiftCrash -emit-module -o %t/SR5191_reversed.swiftmodule %S/Inputs/SR5191-other.swift %s
|
|
|
|
// REQUIRES: objc_interop
|
|
// The module name is significant here; it must be later ASCIIbetically than
|
|
// "Swift". This has to do with the canonical ordering of protocols, including
|
|
// those inherited by extending NSObject.
|
|
|
|
import Foundation
|
|
|
|
class FooImpl: NSObject, FooProto, BazProto {
|
|
required init(bar: BarImpl) {}
|
|
}
|