Commit a7c10aec authored by Kirill Smelkov's avatar Kirill Smelkov

go/neo/proto: protogen: Fix it not to silently skip a pointer field

Without the fix any pointer field of a struct would be silently skipped
without any serialization code generated for it. With the patch default
case triggers in and reports detail where such type is and in which
struct/field it is used.

Besides *mem.Buf - that is handled specially - we don't have pointers in
proto.go, so this currently does not affect generated code at all.

Noticed accidentally.
parent 7f590617
// Copyright (C) 2016-2020 Nexedi SA and Contributors.
// Copyright (C) 2016-2021 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......@@ -1241,8 +1241,6 @@ func codegenType(path string, typ types.Type, obj types.Object, codegen CodeGene
case *types.Map:
codegen.genMap(path, u, obj)
case *types.Pointer:
default:
log.Fatalf("%v: %v has unsupported type %v (%v)", pos(obj),
obj.Name(), typ, u)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment