fix: enable isNilCheck on MarshalJson ptr

This commit is contained in:
Gabriel Crispino 2023-12-13 22:08:29 -03:00 committed by Gabriel Crispino
parent df897aec9d
commit 92e091e9bb
1 changed files with 1 additions and 1 deletions

View File

@ -668,7 +668,7 @@ func (c *Compiler) structFieldCode(structCode *StructCode, tag *runtime.StructTa
}
fieldCode.value = code
fieldCode.isAddrForMarshaler = true
fieldCode.isNilCheck = false
fieldCode.isNilCheck = true
case isPtr && c.isPtrMarshalTextType(fieldType):
// *struct{ field T }
// func (*T) MarshalText() ([]byte, error)