Skip to content

Commit 237e393

Browse files
committed
AST: Clarify comments
1 parent af51b5f commit 237e393

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

include/swift/AST/Types.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class RecursiveTypeProperties {
182182
/// Contains a PackType.
183183
HasPack = 0x10000,
184184

185-
/// Contains a PackArchetypeType.
185+
/// Contains a PackArchetypeType. Also implies HasPrimaryArchetype.
186186
HasPackArchetype = 0x20000,
187187

188188
Last_Property = HasPackArchetype
@@ -205,7 +205,8 @@ class RecursiveTypeProperties {
205205
bool hasTypeVariable() const { return Bits & HasTypeVariable; }
206206

207207
/// Does a type with these properties structurally contain a primary
208-
/// archetype?
208+
/// or pack archetype? These are the archetypes instantiated from a
209+
/// primary generic environment.
209210
bool hasPrimaryArchetype() const { return Bits & HasPrimaryArchetype; }
210211

211212
/// Does a type with these properties structurally contain an
@@ -695,7 +696,9 @@ class alignas(1 << TypeAlignInBits) TypeBase
695696
return getRecursiveProperties().hasPlaceholder();
696697
}
697698

698-
/// Determine whether the type involves a primary archetype.
699+
/// Determine whether the type involves a PrimaryArchetypeType *or* a
700+
/// PackArchetypeType. These are the archetypes instantiated from a
701+
/// primary generic environment.
699702
bool hasPrimaryArchetype() const {
700703
return getRecursiveProperties().hasPrimaryArchetype();
701704
}

0 commit comments

Comments
 (0)