Skip to content

Commit

Permalink
Fix DocumentationTypeReference precondition
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlabelle committed Oct 27, 2024
1 parent 6660d38 commit 5629fd2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extension DocumentationTypeReference {

extension DocumentationTypeReference.Genericity {
public init(forTypeDefinition typeDefinition: TypeDefinition, genericArgs: [TypeNode]?) {
precondition(typeDefinition.genericArity == (genericArgs?.count ?? 0))
precondition(typeDefinition.genericArity == (genericArgs?.count ?? typeDefinition.genericArity))
if let genericArgs {
self = .bound(genericArgs.map { .init(forTypeNode: $0) })
}
Expand Down

0 comments on commit 5629fd2

Please sign in to comment.