applicable var
This commit is contained in:
parent
f7bbe31ee5
commit
e3887691d2
9
src/vm.c
9
src/vm.c
|
@ -712,6 +712,15 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
|
||||||
L_CALL:
|
L_CALL:
|
||||||
x = pic->sp[-c.u.i];
|
x = pic->sp[-c.u.i];
|
||||||
if (! pic_proc_p(x)) {
|
if (! pic_proc_p(x)) {
|
||||||
|
|
||||||
|
if (pic_var_p(x)) {
|
||||||
|
if (c.u.i != 1) {
|
||||||
|
pic_errorf(pic, "invalid call-sequence for var object");
|
||||||
|
}
|
||||||
|
POP();
|
||||||
|
PUSH(pic_var_ref(pic, pic_var_ptr(x)));
|
||||||
|
NEXT;
|
||||||
|
}
|
||||||
pic_errorf(pic, "invalid application: ~s", x);
|
pic_errorf(pic, "invalid application: ~s", x);
|
||||||
}
|
}
|
||||||
proc = pic_proc_ptr(x);
|
proc = pic_proc_ptr(x);
|
||||||
|
|
Loading…
Reference in New Issue