mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The following tests are disabled here:
compiler_crashers_2/0208-sr8751.swift
compiler_crashers_2/0207-sr7371.swift
rdar://problem/65571199
39 lines
1.1 KiB
Swift
39 lines
1.1 KiB
Swift
// RUN: not --crash %target-swift-frontend -emit-ir %s
|
|
// rdar://problem/65571199
|
|
// UNSUPPORTED: asan
|
|
|
|
public protocol TypedParserResultTransferType {
|
|
// Remove type constraint
|
|
associatedtype Result: ParserResult
|
|
}
|
|
|
|
public struct AnyTypedParserResultTransferType<P: ParserResult>: TypedParserResultTransferType {
|
|
public typealias Result = P
|
|
// Remove property
|
|
public let result: P
|
|
}
|
|
|
|
public protocol ParserResult {}
|
|
public protocol StaticParser: ParserResult {}
|
|
|
|
// Change comformance to ParserResult
|
|
public protocol TypedStaticParser: StaticParser {
|
|
// Remove type constraint
|
|
associatedtype ResultTransferType: TypedParserResultTransferType
|
|
}
|
|
|
|
// Remove where clause
|
|
public protocol MutableSelfStaticParser: TypedStaticParser where ResultTransferType == AnyTypedParserResultTransferType<Self> {
|
|
func parseTypeVar() -> AnyTypedParserResultTransferType<Self>
|
|
}
|
|
|
|
extension MutableSelfStaticParser {
|
|
|
|
public func anyFunction() -> () {
|
|
let t = self.parseTypeVar
|
|
// Remove this and below
|
|
_ = t()
|
|
_ = self.parseTypeVar()
|
|
}
|
|
}
|