mirror of
https://github.com/janet-lang/janet
synced 2025-10-31 23:53:02 +00:00
Fix bug in compiler with if form under certain conditions.
Begin bundled 'cook' tool for managing janet projects.
This commit is contained in:
@@ -369,8 +369,9 @@ static JanetSlot janetc_if(JanetFopts opts, int32_t argn, const Janet *argv) {
|
||||
falsebody = truebody;
|
||||
truebody = temp;
|
||||
}
|
||||
janetc_scope(&tempscope, c, 0, "if-body");
|
||||
target = janetc_value(bodyopts, truebody);
|
||||
janetc_scope(&tempscope, c, 0, "if-true");
|
||||
right = janetc_value(bodyopts, truebody);
|
||||
if (!drop && !tail) janetc_copy(c, target, right);
|
||||
janetc_popscope(c);
|
||||
janetc_throwaway(bodyopts, falsebody);
|
||||
janetc_popscope(c);
|
||||
|
||||
Reference in New Issue
Block a user