zserio
zserio copied to clipboard
Misleading error message when using parametrized types in a wrong way.
zserio reports: ERROR] myschema.zs:6:5: Parameterized type instantiation 'StructWithParam' has wrong number of arguments! Expecting 1, got 2!
when using the following schema:
package myschema;
struct Test
{
StructWithParams(10) value;
};
struct StructWithParams(int32 first, int32 second)
{
};
zserio should report it the other way around as StructWithParams defines how many parameters (=2) are expected.
Further improvements for the error message:
- show exact signature
StructWithParam(int32, int32)in the error message - report if there are
too few/too manyparameters
Thanks for that, we will fix it in current milestone.