Files
swift-mirror/validation-test/compiler_crashers_2/sr11108.swift
Jorge Revuelta Herrero cec0821220 Compiler crash for SR11108
2019-09-11 13:47:15 +02:00

28 lines
550 B
Swift

// RUN: not --crash %target-swift-emit-silgen %s
// REQUIRES: asserts
protocol Example {
associatedtype Signed: SignedInteger
associatedtype SP: StringProtocol
var string: String { get }
}
extension Example {
var string: String {
return "Foo"
}
}
class MyClass<T: SignedInteger, S: StringProtocol>: Example {
typealias Signed = T
typealias SP = S
}
extension MyClass where T == Int, S == String {
var string: String {
return "Bar"
}
}
let myclass = MyClass<Int, String>()
print(myclass.string)