mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
16 lines
344 B
Swift
16 lines
344 B
Swift
// RUN: %target-swift-frontend -disable-availability-checking -emit-ir -o /dev/null %s
|
|
|
|
// https://github.com/apple/swift/issues/55643
|
|
|
|
protocol MyProtocol {}
|
|
|
|
func doNotCrash1() -> some MyProtocol {
|
|
class MyClass1: MyProtocol {}
|
|
return MyClass1()
|
|
}
|
|
|
|
var doNotCrash2: some MyProtocol {
|
|
class MyClass2: MyProtocol {}
|
|
return MyClass2()
|
|
}
|