Skip to content

Commit

Permalink
Drop generating "compat setter pointer" for optional map thrift fileds
Browse files Browse the repository at this point in the history
Summary:
Modernizing code generator for Go

#build_rule_type[go_library,go_binary,go_unittest,go_test]

Reviewed By: echistyakov

Differential Revision: D68407033

fbshipit-source-id: 24b7508008cfbdef41254c8d23ed75138952a725
  • Loading branch information
inesusvet authored and facebook-github-bot committed Jan 24, 2025
1 parent 2ed7271 commit bd490e6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions thrift/compiler/generate/t_mstch_go_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,7 @@ class mstch_go_field : public mstch_field {
// This method helps with backwards compatibility.
bool has_default_value = (field_->default_value() != nullptr);
if (is_optional_() && has_default_value) {
auto real_type = field_->type()->get_true_type();
bool is_container = real_type->is_map();
return is_container;
return false;
}
return is_pointer_();
}
Expand Down

0 comments on commit bd490e6

Please sign in to comment.