Skip to content

Commit 29ae605

Browse files
committed
[TypeChecker] NFC: Add a test-case for rdar://problem/62842651
1 parent 191fcc4 commit 29ae605

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/Constraints/rdar62842651.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// RUN: %target-swift-frontend -emit-sil -verify %s | %FileCheck %s
2+
3+
class A {}
4+
class B: A {}
5+
6+
func test<T>(_ type: T.Type) -> T? {
7+
fatalError()
8+
}
9+
10+
// CHECK: [[RESULT:%.*]] = function_ref @$s12rdar628426514testyxSgxmlF
11+
// CHECK-NEXT: apply [[RESULT]]<B>({{.*}})
12+
let _: A? = test(B.self)

0 commit comments

Comments
 (0)