Skip to content

Commit b4323c8

Browse files
committed
[TypeLowering] Loosen assertion.
1 parent 50deb13 commit b4323c8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/SIL/IR/TypeLowering.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3074,6 +3074,7 @@ void TypeConverter::verifyTrivialLowering(const TypeLowering &lowering,
30743074
// (6) being defined in a module built from interface
30753075
// (7) being or containing a variadic generic type which doesn't conform
30763076
// unconditionally but does in this case
3077+
// (8) being or containing the error type
30773078
bool hasNoNonconformingNode = visitAggregateLeaves(
30783079
origType, substType, forExpansion,
30793080
/*isLeafAggregate=*/
@@ -3120,6 +3121,10 @@ void TypeConverter::verifyTrivialLowering(const TypeLowering &lowering,
31203121

31213122
auto isTopLevel = !field;
31223123

3124+
// The error type doesn't conform but is trivial (case (8)).
3125+
if (isa<ErrorType>(ty))
3126+
return false;
3127+
31233128
// These show up in the context of non-conforming variadic generics
31243129
// which may lack a conformance (case (7)).
31253130
if (isa<SILPackType>(ty) || isa<PackExpansionType>(ty))

0 commit comments

Comments
 (0)