We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0aff7c0 commit 208ef65Copy full SHA for 208ef65
test/SILOptimizer/specialized_anyobject_conformance.swift
@@ -0,0 +1,23 @@
1
+// RUN: %target-swift-frontend -O -sil-inline-threshold 0 -emit-sil -primary-file %s | %FileCheck %s
2
+
3
+// rdar://problem/31910351
4
5
+// Check that swift compiler does not crash on this input.
6
7
+public protocol P {
8
+ func use<T:AnyObject>(_ t: T)
9
+}
10
11
+public class C<T> {
12
13
14
+public func callee(_ t: C<Int32>?, _ p: P) {
15
+ // This call results in a creation of a specialized conformance of C<Int32> to AnyObject.
16
+ p.use(t!)
17
18
19
+// CHECK-LABEL: sil @_T033specialized_anyobject_conformance7caller1yAA1P_p1p_tF : $@convention(thin) (@in P) -> ()
20
+public func caller1(p: P) {
21
+ callee(C<Int32>(), p)
22
23
0 commit comments