Skip to content

Commit 0197784

Browse files
committed
[embedded] Tighten the check which existentials we support in embedded with existentials
1 parent f7aae22 commit 0197784

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

SwiftCompilerSources/Sources/Optimizer/ModulePasses/EmbeddedSwiftDiagnostics.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ private struct FunctionChecker {
9494
for conf in ie.conformances {
9595
try checkConformance(conf, location: ie.location)
9696
}
97+
} else if instruction is OpenExistentialAddrInst {
98+
// okay in embedded with exitentials
99+
} else {
100+
// not supported even in embedded with exitentials
101+
throw Diagnostic(.embedded_swift_existential_type, instruction.operands[0].value.type, at: instruction.location)
97102
}
98103

99104
case let aeb as AllocExistentialBoxInst:

0 commit comments

Comments
 (0)