@@ -51,21 +51,6 @@ public enum TypeDescription: Codable, Hashable, Comparable, Sendable {
51
51
/// A type that can't be represented by the above cases.
52
52
case unknown( text: String )
53
53
54
- /// Creates a type description of case `.nested` with the given name as the name and the receiver as the parent type.
55
- /// If no parent is provided, creates a type description of case `.simple`.
56
- ///
57
- /// - Parameters:
58
- /// - name: The simple name of the returned type.
59
- /// - parent: The parent type for the returned type.
60
- /// - Note: This method only makes sense when the `parent` is of case `simple`, `nested`, `optional`, and `implicitlyUnwrappedOptional`.
61
- init ( name: String , parent: TypeDescription ? ) {
62
- if let parent = parent {
63
- self = . nested( name: name, parentType: parent)
64
- } else {
65
- self = . simple( name: name)
66
- }
67
- }
68
-
69
54
/// A shortcut for creating a `simple` case without any generic types.
70
55
public static func simple( name: String ) -> TypeDescription {
71
56
. simple( name: name, generics: [ ] )
@@ -333,15 +318,7 @@ public enum TypeDescription: Codable, Hashable, Comparable, Sendable {
333
318
let . optional( typeDescription) ,
334
319
let . some( typeDescription) :
335
320
return typeDescription. asInstantiatedType
336
- case . array,
337
- . attributed,
338
- . closure,
339
- . composition,
340
- . dictionary,
341
- . metatype,
342
- . nested,
343
- . tuple,
344
- . unknown:
321
+ case . array, . attributed, . closure, . composition, . dictionary, . metatype, . nested, . tuple, . unknown:
345
322
return self
346
323
}
347
324
}
@@ -536,18 +513,7 @@ extension ExprSyntax {
536
513
name: name,
537
514
parentType: parentType, generics: genericTypeVisitor. genericArguments
538
515
)
539
- case . any,
540
- . array,
541
- . attributed,
542
- . closure,
543
- . composition,
544
- . dictionary,
545
- . implicitlyUnwrappedOptional,
546
- . metatype,
547
- . optional,
548
- . some,
549
- . tuple,
550
- . unknown:
516
+ case . any, . array, . attributed, . closure, . composition, . dictionary, . implicitlyUnwrappedOptional, . metatype, . optional, . some, . tuple, . unknown:
551
517
return . unknown( text: description)
552
518
}
553
519
} else if let tupleExpr = TupleExprSyntax ( self ) {
0 commit comments