make •FFI properly error on non-list 𝕩
This commit is contained in:
parent
162e6ff387
commit
86c7b47771
@ -1082,6 +1082,7 @@ static u64 calcStaticSize(B o) {
|
||||
}
|
||||
|
||||
B ffiload_c2(B t, B w, B x) {
|
||||
if (!isArr(x) || RNK(x)!=1) thrM("•FFI: 𝕩 must be a list");
|
||||
usz xia = IA(x);
|
||||
if (xia<2) thrM("FFI: Function specification must have at least two items");
|
||||
usz argn = xia-2;
|
||||
|
||||
@ -5,6 +5,8 @@
|
||||
|
||||
# bad •FFI invocation
|
||||
# generally weird
|
||||
!"•FFI: 𝕩 must be a list" % @•FFI @
|
||||
!"•FFI: 𝕩 must be a list" % @•FFI 2‿2⥊<"a"
|
||||
!"•FFI: Path must be a list of characters" % 1‿2 •FFI ""‿"bqn_init"
|
||||
!"This function can't be called monadically" % •FFI ""‿"bqn_init"
|
||||
@ •FFI⎊{𝕊: 28↑•CurrentError@} ""‿"bqn_this symbol doesn't exist" %% "FFI: Failed to find symbol: "
|
||||
|
||||
Loading…
Reference in New Issue
Block a user