Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/IRGen/GenMeta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1393,12 +1393,13 @@ namespace {

// Create placeholders for the counts of the conditional requirements
// for each conditional conformance to a supressible protocol.
unsigned numProtocols = countBitsUsed(protocols.rawBits());
unsigned numProtocols = 0;
using PlaceholderPosition =
ConstantAggregateBuilderBase::PlaceholderPosition;
SmallVector<PlaceholderPosition, 2> countPlaceholders;
for (unsigned i : range(0, numProtocols)) {
(void)i;
for (auto kind : protocols) {
(void)kind;
numProtocols++;
countPlaceholders.push_back(
B.addPlaceholderWithSize(IGM.Int16Ty));
}
Expand Down
8 changes: 8 additions & 0 deletions validation-test/IRGen/rdar153681688.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// RUN: %target-swift-frontend %s -target %target-swift-5.9-abi-triple -emit-ir

public enum Enum<T : ~Escapable> : ~Escapable {
case none
case some(T)
}

extension Enum: Escapable where T: Escapable {}