@@ -48,6 +48,10 @@ public struct Type: TypeProperties, CustomStringConvertible, NoReflectionChildre
48
48
49
49
public var instanceTypeOfMetatype : Type { Type ( bridged: bridged. getInstanceTypeOfMetatype ( ) ) }
50
50
51
+ public var staticTypeOfDynamicSelf : Type { Type ( bridged: bridged. getStaticTypeOfDynamicSelf ( ) ) }
52
+
53
+ public var interfaceTypeOfArchetype : Type { Type ( bridged: bridged. getInterfaceTypeOfArchetype ( ) ) }
54
+
51
55
public var superClassType : Type ? {
52
56
precondition ( isClass)
53
57
let bridgedSuperClassTy = bridged. getSuperClassType ( )
@@ -136,10 +140,14 @@ extension TypeProperties {
136
140
137
141
public var isTuple : Bool { rawType. bridged. isTuple ( ) }
138
142
public var isFunction : Bool { rawType. bridged. isFunction ( ) }
143
+ public var isArchetype : Bool { rawType. bridged. isArchetype ( ) }
139
144
public var isExistentialArchetype : Bool { rawType. bridged. isExistentialArchetype ( ) }
140
145
public var isExistentialArchetypeWithError : Bool { rawType. bridged. isExistentialArchetypeWithError ( ) }
146
+ public var isRootArchetype : Bool { rawType. interfaceTypeOfArchetype. isGenericTypeParameter }
147
+ public var isRootExistentialArchetype : Bool { isExistentialArchetype && isRootArchetype }
141
148
public var isExistential : Bool { rawType. bridged. isExistential ( ) }
142
149
public var isClassExistential : Bool { rawType. bridged. isClassExistential ( ) }
150
+ public var isGenericTypeParameter : Bool { rawType. bridged. isGenericTypeParam ( ) }
143
151
public var isUnownedStorageType : Bool { return rawType. bridged. isUnownedStorageType ( ) }
144
152
public var isMetatype : Bool { rawType. bridged. isMetatypeType ( ) }
145
153
public var isExistentialMetatype : Bool { rawType. bridged. isExistentialMetatypeType ( ) }
@@ -187,6 +195,7 @@ extension TypeProperties {
187
195
public var isEscapable : Bool { rawType. bridged. isEscapable ( ) }
188
196
public var isNoEscape : Bool { rawType. bridged. isNoEscape ( ) }
189
197
public var isBuiltinType : Bool { rawType. bridged. isBuiltinType ( ) }
198
+ public var archetypeRequiresClass : Bool { rawType. bridged. archetypeRequiresClass ( ) }
190
199
191
200
public var representationOfMetatype : AST . `Type` . MetatypeRepresentation {
192
201
rawType. bridged. getRepresentationOfMetatype ( ) . representation
0 commit comments