You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary: if an interface has methods that return byte[] in java, the class will fail to compile if the declaration of the interface in the InfoMap is marked with .virtualize().
If .virtualize() is not added, then everything compiles.
This problem seems to occur specifically with arrays, such as byte[]. Returning a BytePointer, for example, does not cause a compile error.
Minimal C++ code
Suppose you have the following interface in C++:
namespacevola {
using Bytes = std::vector<char>;
/// Format specifier used to determine how serialization should be doneenumclassFormatIO {
JSON, ///< Format as json
YAML, ///< Format as YAML
MSGPACK, ///< Format as MSGPACK
};
/// Base class for Serializable typesclassDLL_PUBLIC SerializableI {
public:virtual~SerializableI() = default;
/// Convert this object to an array of bytes/// @param format format specifier/// @return serialized representation of objectvirtual Bytes toBytes(FormatIO format) const = 0;
};
using SerializableH = std::shared_ptr<SerializableI>;
DLL_PUBLIC SerializableH makeTestObject(std::string input);
} // namespace vola
Summary: if an interface has methods that return
byte[]
in java, the class will fail to compile if the declaration of the interface in the InfoMap is marked with.virtualize()
.If
.virtualize()
is not added, then everything compiles.This problem seems to occur specifically with arrays, such as
byte[]
. Returning aBytePointer
, for example, does not cause a compile error.Minimal C++ code
Suppose you have the following interface in C++:
Minimal
InfoMapper
codeCompile error
The text was updated successfully, but these errors were encountered: