I'm trying to wrap my head around substitutions in mangling:
I'm getting:
public struct Theo<T> {
public func John(_ a: Int, _ B: Theo<T>){}
}
$s5carlo4TheoV4JohnyySi_ACyxGtF
My question is about the ACyxG now yxG is generics, but the "AC" I don't get.
I thought word substitution worked for well, words, but independent of the nr of words, the type for Theo always ends up written as AC. Can someone explain what I'm missing?
if I do:
public struct StructTest<T> {
public var x: T
public func Fred(_ a: Int, _ b: StructTest<T>) {}
}
I get:
$s5carlo10StructTestV4FredyySi_ACyxGtF
Which also uses AC to denote StructTest, despite it being two words.
Does anyone here know enough about the mangling to explain how this works?