generate: Pass decoder to branch functions

This commit is contained in:
Sasha Koshka 2025-08-06 18:40:28 -04:00
parent fa4f591126
commit 195d0f9725

View File

@ -578,7 +578,7 @@ func (this *Generator) generateDecodeValue(typ Type, valueSource, tagSource stri
// - nn int
func (this *Generator) generateDecodeBranchCall(typ Type, valueSource, tagSource string) (n int, err error) {
hash := HashType(typ)
nn, err := this.iprintf("nn, err = %s(%s, %s)\n", this.decodeBranchName(hash), valueSource, tagSource)
nn, err := this.iprintf("nn, err = %s(%s, decoder, %s)\n", this.decodeBranchName(hash), valueSource, tagSource)
n += nn; if err != nil { return n, err }
nn, err = this.generateErrorCheck()
n += nn; if err != nil { return n, err }