Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
C++: implement doByteArrayNonLiteral - create array from expression o…
…f `bytes` type Expressions of this type are created using: - omitting the `type:` field in attributes and parse instances - declaring parameters with `type: bytes` - using `.as<bytes>` cast Ghostly fixes test ``` [info] - cpp_stl:[0 + 1, 5].as<bytes> *** FAILED *** [info] scala.NotImplementedError: an implementation is missing [info] at scala.Predef$.$qmark$qmark$qmark(Predef.scala:344) [info] at io.kaitai.struct.translators.BaseTranslator.doByteArrayNonLiteral(BaseTranslator.scala:179) [info] at io.kaitai.struct.translators.BaseTranslator.doByteArrayNonLiteral(BaseTranslator.scala:28) [info] at io.kaitai.struct.translators.CommonArraysAndCast.doByteArray(CommonArraysAndCast.scala:85) [info] at io.kaitai.struct.translators.CommonArraysAndCast.doCastOrArray(CommonArraysAndCast.scala:62) [info] at io.kaitai.struct.translators.CommonArraysAndCast.doCastOrArray$(CommonArraysAndCast.scala:53) [info] at io.kaitai.struct.translators.BaseTranslator.doCastOrArray(BaseTranslator.scala:28) [info] at io.kaitai.struct.translators.BaseTranslator.translate(BaseTranslator.scala:147) [info] at io.kaitai.struct.translators.AbstractTranslator.translate(AbstractTranslator.scala:25) [info] at io.kaitai.struct.translators.AbstractTranslator.translate$(AbstractTranslator.scala:25) [info] ... ``` (actually, test is failing because option `useListInitializers` in C++ backend is not set in tests and code generation without it is not unimplemented right now) Co-authored-by: Petr Pučil <[email protected]>
- Loading branch information