You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Yuxuan Wang (Jira)" <ji...@apache.org> on 2021/09/10 15:59:00 UTC

[jira] [Created] (THRIFT-5463) Incorrect and inconsistency in compiler generated go code regarding pointer types

Yuxuan Wang created THRIFT-5463:
-----------------------------------

             Summary: Incorrect and inconsistency in compiler generated go code regarding pointer types
                 Key: THRIFT-5463
                 URL: https://issues.apache.org/jira/browse/THRIFT-5463
             Project: Thrift
          Issue Type: Bug
          Components: Go - Compiler
    Affects Versions: 0.14.2, 0.15.0
            Reporter: Yuxuan Wang


This is the continuation/followup from THRIFT-5389 and THRIFT-5461.
 # For container fields of a struct (map/list/set), we make the container type a point when it has default value set, but we didn't handle that correctly when generating the constant value (part of THRIFT-3289 but missed from the fix)
 # The decision on whether to make string/binary fields of a struct's type a pointer is inconsistent from container types. For container types we make it a pointer when it has a default value, so we determine IsSet* by checking if the pointer is nil. But for string we make it not a pointer when it has default value, and determine IsSet* by checking if the value is the same as the default. We should make them consistent.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)