Skip to content

Commit cec0821

Browse files
committed
Compiler crash for SR11108
1 parent c79214c commit cec0821

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// RUN: not --crash %target-swift-emit-silgen %s
2+
3+
// REQUIRES: asserts
4+
5+
protocol Example {
6+
associatedtype Signed: SignedInteger
7+
associatedtype SP: StringProtocol
8+
var string: String { get }
9+
}
10+
extension Example {
11+
var string: String {
12+
return "Foo"
13+
}
14+
}
15+
class MyClass<T: SignedInteger, S: StringProtocol>: Example {
16+
typealias Signed = T
17+
typealias SP = S
18+
}
19+
extension MyClass where T == Int, S == String {
20+
var string: String {
21+
return "Bar"
22+
}
23+
}
24+
25+
let myclass = MyClass<Int, String>()
26+
27+
print(myclass.string)

0 commit comments

Comments
 (0)