Skip to content

Commit a0a4169

Browse files
committed
Sema: Workaround for failing swift-corelibs-foundation build on Linux
Previously, hasArgumentType() would silently return false if the EnumElementDecl had not yet been typechecked, but now, getArgumentInterfaceType() asserts in this case. As the FIXME comment suggests, this warrants further investigation, but for now add the workaround.
1 parent b3cabb0 commit a0a4169

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6857,6 +6857,11 @@ static bool checkEnumDeclCircularity(EnumDecl *E, NominalDeclSet &known,
68576857
known.insert(E);
68586858

68596859
for (auto elt: E->getAllElements()) {
6860+
// FIXME: Strange that this can happen, it means we're potentially
6861+
// not diagnosing circularity when we should be.
6862+
if (!elt->hasInterfaceType())
6863+
continue;
6864+
68606865
// skip uninteresting fields.
68616866
if (!elt->getArgumentInterfaceType() || elt->isIndirect())
68626867
continue;

0 commit comments

Comments
 (0)