mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
* [Mangling] Add a new mangling to represent opaque return type for ObjC runtime name * [Docs] Add the new 'Qu' mangling to 'Mangling.rst' document * [Test] Update test invocation arguments
14 lines
296 B
Swift
14 lines
296 B
Swift
// RUN: %target-swift-frontend -disable-availability-checking -emit-ir -o /dev/null %s
|
|
|
|
protocol MyProtocol {}
|
|
|
|
func doNotCrash1() -> some MyProtocol {
|
|
class MyClass1: MyProtocol {}
|
|
return MyClass1()
|
|
}
|
|
|
|
var doNotCrash2: some MyProtocol {
|
|
class MyClass2: MyProtocol {}
|
|
return MyClass2()
|
|
}
|