more proper error message

This commit is contained in:
dzaima 2024-02-04 23:27:28 +02:00
parent 7edcccdf82
commit e89d59c606
2 changed files with 3 additions and 2 deletions

View File

@ -661,7 +661,7 @@ void genObj(B o, B c, bool anyMut, void* ptr) { // doesn't consume
B e = t->a[0].o;
if (!isArr(c)) {
if (isC32(e)) thrF("FFI: Expected array corresponding to \"*%S\"", sty_names[o2cG(e)]);
else thrM("FFI: Expected array corresponding to *{...}");
else thrM("FFI: Expected array corresponding to *...");
}
usz ia = IA(c);
if (t->ty==cty_tlarr && t->arrCount!=ia) thrF("FFI: Incorrect item count of %s corresponding to \"[%s]...\"", ia, (usz)t->arrCount);

View File

@ -130,7 +130,8 @@
# wrong argument internal structure
!"FFI: Expected array corresponding to *{...}" % f@•FFI"""bqn_init"">*{i32}" F @
!"FFI: Expected array corresponding to *..." % f@•FFI"""bqn_init"">*[2]i32" F @
!"FFI: Expected array corresponding to *..." % f@•FFI"""bqn_init"">*{i32}" F @
!"FFI: Expected array corresponding to a struct" % f@•FFI"""bqn_init"">{i32}" F @
!"FFI: Expected array corresponding to a struct" % f@•FFI"""bqn_init"">*{i32}" F @
!"FFI: Incorrect list length corresponding to a struct: expected 1, got 0" % f@•FFI"""bqn_init"">*{i32}" F