@@ -61,8 +61,6 @@ public struct Type: TypeProperties, CustomStringConvertible, NoReflectionChildre
61
61
62
62
public var builtinVectorElementType : Type { Type ( bridged: bridged. getBuiltinVectorElementType ( ) ) }
63
63
64
- public var builtinFixedArrayElementType : Type { Type ( bridged: bridged. getBuiltinFixedArrayElementType ( ) ) }
65
-
66
64
public func subst( with substitutionMap: SubstitutionMap ) -> Type {
67
65
return Type ( bridged: bridged. subst ( substitutionMap. bridged) )
68
66
}
@@ -83,8 +81,6 @@ public struct CanonicalType: TypeProperties, CustomStringConvertible, NoReflecti
83
81
84
82
public var builtinVectorElementType : CanonicalType { rawType. builtinVectorElementType. canonical }
85
83
86
- public var builtinFixedArrayElementType : CanonicalType { rawType. builtinFixedArrayElementType. canonical }
87
-
88
84
public func subst( with substitutionMap: SubstitutionMap ) -> CanonicalType {
89
85
return rawType. subst ( with: substitutionMap) . canonical
90
86
}
@@ -195,6 +191,23 @@ extension TypeProperties {
195
191
rawType. bridged. getRepresentationOfMetatype ( ) . representation
196
192
}
197
193
194
+ public var builtinFixedArrayElementType : CanonicalType {
195
+ CanonicalType ( bridged: rawType. bridged. getBuiltinFixedArrayElementType ( ) )
196
+ }
197
+ public var builtinFixedArraySizeType : CanonicalType {
198
+ CanonicalType ( bridged: rawType. bridged. getBuiltinFixedArraySizeType ( ) )
199
+ }
200
+
201
+ /// Returns the value of an integer value type (see `isInteger`).
202
+ /// Returns nil if the value is not representable in an `Int`.
203
+ public var valueOfInteger : Int ? {
204
+ let optionalInt = rawType. bridged. getValueOfIntegerType ( )
205
+ if optionalInt. hasValue {
206
+ return optionalInt. value
207
+ }
208
+ return nil
209
+ }
210
+
198
211
/// Assumes this is a nominal type. Returns a substitution map that sends each
199
212
/// generic parameter of the declaration's generic signature to the corresponding
200
213
/// generic argument of this nominal type.
0 commit comments