@@ -48,6 +48,10 @@ public struct Type: TypeProperties, CustomStringConvertible, NoReflectionChildre
4848
4949 public var instanceTypeOfMetatype : Type { Type ( bridged: bridged. getInstanceTypeOfMetatype ( ) ) }
5050
51+ public var staticTypeOfDynamicSelf : Type { Type ( bridged: bridged. getStaticTypeOfDynamicSelf ( ) ) }
52+
53+ public var interfaceTypeOfArchetype : Type { Type ( bridged: bridged. getInterfaceTypeOfArchetype ( ) ) }
54+
5155 public var superClassType : Type ? {
5256 precondition ( isClass)
5357 let bridgedSuperClassTy = bridged. getSuperClassType ( )
@@ -136,10 +140,14 @@ extension TypeProperties {
136140
137141 public var isTuple : Bool { rawType. bridged. isTuple ( ) }
138142 public var isFunction : Bool { rawType. bridged. isFunction ( ) }
143+ public var isArchetype : Bool { rawType. bridged. isArchetype ( ) }
139144 public var isExistentialArchetype : Bool { rawType. bridged. isExistentialArchetype ( ) }
140145 public var isExistentialArchetypeWithError : Bool { rawType. bridged. isExistentialArchetypeWithError ( ) }
146+ public var isRootArchetype : Bool { rawType. interfaceTypeOfArchetype. isGenericTypeParameter }
147+ public var isRootExistentialArchetype : Bool { isExistentialArchetype && isRootArchetype }
141148 public var isExistential : Bool { rawType. bridged. isExistential ( ) }
142149 public var isClassExistential : Bool { rawType. bridged. isClassExistential ( ) }
150+ public var isGenericTypeParameter : Bool { rawType. bridged. isGenericTypeParam ( ) }
143151 public var isUnownedStorageType : Bool { return rawType. bridged. isUnownedStorageType ( ) }
144152 public var isMetatype : Bool { rawType. bridged. isMetatypeType ( ) }
145153 public var isExistentialMetatype : Bool { rawType. bridged. isExistentialMetatypeType ( ) }
@@ -187,6 +195,7 @@ extension TypeProperties {
187195 public var isEscapable : Bool { rawType. bridged. isEscapable ( ) }
188196 public var isNoEscape : Bool { rawType. bridged. isNoEscape ( ) }
189197 public var isBuiltinType : Bool { rawType. bridged. isBuiltinType ( ) }
198+ public var archetypeRequiresClass : Bool { rawType. bridged. archetypeRequiresClass ( ) }
190199
191200 public var representationOfMetatype : AST . `Type` . MetatypeRepresentation {
192201 rawType. bridged. getRepresentationOfMetatype ( ) . representation
0 commit comments