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 26b91ef commit 5e4ae5eCopy full SHA for 5e4ae5e
lib/IRGen/GenStruct.cpp
@@ -1636,6 +1636,9 @@ void IRGenModule::emitStructDecl(StructDecl *st) {
1636
}
1637
1638
void IRGenModule::maybeEmitOpaqueTypeDecl(OpaqueTypeDecl *opaque) {
1639
+ if (opaque->getASTContext().LangOpts.hasFeature(Feature::Embedded))
1640
+ return;
1641
+
1642
if (!opaque->isAvailableDuringLowering())
1643
return;
1644
test/embedded/opaque-return-types.swift
@@ -0,0 +1,15 @@
1
+// RUN: %target-swift-emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s
2
3
+// REQUIRES: swift_in_compiler
4
+// REQUIRES: VENDOR=apple
5
+// REQUIRES: OS=macosx
6
7
+protocol Proto { }
8
9
+struct MyStruct: Proto { }
10
11
+func foo() -> some Proto {
12
+ MyStruct()
13
+}
14
15
+// CHECK: define {{.*}}@main(
0 commit comments