# Conformance corpus: Swift names `swift-demangle` itself reads wrongly.
#
# One defect, in `NodePrinter`'s `ExtendedExistentialTypeShape` case. The node the
# demangler builds is `[type]`, or `[generic-signature, type]` where the mangling carries
# one (`Demangler::demangleExtendedExistentialShape`, `XG` against `Xg`), and the printer
# reads it one child too high:
#
#     NodePointer genSig = nullptr, type = nullptr;
#     if (Node->getNumChildren() == 2) {
#       genSig = Node->getChild(1);
#       type = Node->getChild(2);       // out of range: there is no child 2
#     } else {
#       type = Node->getChild(1);       // out of range: a one-child node has only 0
#     }
#
# `getChild` returns null past the end rather than asserting, so both branches reach
# `print(nullptr)`, which spells `<null node pointer>`. The type is never printed at all,
# and where a generic signature exists it is printed in that signature's place.
#
# It survives because nothing exercises it: `test/Demangle/Inputs/manglings.txt` has no
# `Xg` or `XG` vector, at any revision, so the reference's own test corpus never asks.
# Reported here rather than followed -- `<null node pointer>` is a diagnostic, not a
# demangling, and a shape whose type is not spelled says nothing about the shape.
#
# The expected column is what the tree says: the type child spelled as a type, and the
# signature child, where there is one, spelled ahead of the `any`. Checked against
# swiftlang/swift at 871a239941f3613c178b91c294f8584345f30f73; see
# tools/swift-demangle-reference/README.md.
#
# `mangled\texpected`, tab-separated.
$sSiXg	existential shape for any Swift.Int
$s4main1PPXg	existential shape for any main.P
$sSSXg	existential shape for any Swift.String
$sSaySiGXg	existential shape for any [Swift.Int]
# The one a shipped runtime carries -- Swift 6.1.2's FoundationEssentials: a shape over
# a constrained existential, with a generic signature (`XG`) and made uniquable (`Mq`).
# The reference prints the type in the signature's place and `<null node pointer>` for
# the type. The `any` is doubled because the printer writes one ahead of every shape's
# type and a constrained existential spells its own; that is what the tree says.
$sl20FoundationEssentials27StandardPredicateExpression_px6OutputRts_XPXGMq	uniquable existential shape for <A> any any FoundationEssentials.StandardPredicateExpression<Self.Output == A>
