thrift icon indicating copy to clipboard operation
thrift copied to clipboard

Add missing underscore in call to ReadField_N

Open cptaffe opened this issue 2 years ago • 1 comments

Fix typo which caused undefined method errors in certain cases.

Generated code would encounter the following compilation error:

go/some_package/some_package-remote/some_package-remote.go:12:34: containerStruct0.ReadField1 undefined (type *some_package.SomeArgs has no field or method ReadField1)

The type of containerStruct0 would instead have the following method:

func (p *SomeArgs)  ReadField_1(ctx context.Context, iprot thrift.TProtocol) error {

cptaffe avatar Apr 19 '22 22:04 cptaffe

@cptaffe can you please provide a minimal example of thrift file that causes this? In most cases we don't add underscore after ReadField so blindly adding an underscore would most likely be wrong.

fishy avatar Sep 03 '22 14:09 fishy