Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix golang oneof with a typed-nil value causes panic. #639

Merged
merged 3 commits into from Oct 25, 2022

Commits on Sep 22, 2022

  1. fix golang oneof with a typed-nil value causes panic.

    The existing generated code for a oneof field causes a nil-panic if
    the field contains a typed-nil value. Go correctly infers the value
    is one of the switch cases but the validation code assumes the
    value is not a typed-nil.
    
    THERE IS AN ARGUMENT THAT THIS BEHAVIOUR IS CORRECT. The authors of
    go protobuf have stated that any typed-nil in a oneof field is
    invalid, and so this maybe should cause a panic. Nil panic however
    is not a helpful error message, and maybe the behaviour should be
    given as a option to the invoker.
    anzboi committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    98369f1 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2022

  1. Configuration menu
    Copy the full SHA
    b9d6756 View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2022

  1. Configuration menu
    Copy the full SHA
    c28b178 View commit details
    Browse the repository at this point in the history