From ede1105eb313c222b7e1d9f1c357cfaac4b6a964 Mon Sep 17 00:00:00 2001 From: Petr Pucil Date: Mon, 15 Apr 2024 23:09:55 +0200 Subject: [PATCH] formats_err: add `nav_parent_multi_one_unused` See https://github.com/kaitai-io/kaitai_struct/issues/961 --- formats_err/nav_parent_multi_one_unused.ksy | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 formats_err/nav_parent_multi_one_unused.ksy diff --git a/formats_err/nav_parent_multi_one_unused.ksy b/formats_err/nav_parent_multi_one_unused.ksy new file mode 100644 index 000000000..7c3bc6bf6 --- /dev/null +++ b/formats_err/nav_parent_multi_one_unused.ksy @@ -0,0 +1,23 @@ +# nav_parent_multi_one_unused.ksy: /types/common/seq/0/size: +# error: don't know how to call method 'len_body' of object type 'CalcKaitaiStructType(false)' +# +meta: + id: nav_parent_multi_one_unused +seq: + - id: len_body + type: u1 + - id: branch + type: common +types: + # This type is unreachable from the top-level `seq`, but it is still + # generated, so it must affect the derived type of `_parent` in the + # `common` type, otherwise we would run into + # https://github.com/kaitai-io/kaitai_struct/issues/961. + unreachable: + seq: + - id: branch + type: common + common: + seq: + - id: body + size: _parent.len_body