Skip to content

Commit 825b7cc

Browse files
author
meister
committed
Fixed a few asserts
1 parent b54aec6 commit 825b7cc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/core/bytecode_compiler.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,8 +1887,10 @@ void compile_with_lambda_list(T_sp lambda_list, List_sp body, Lexenv_sp env, con
18871887
ibindings << Cons_O::createList(optional_var, varinfo->lex(), context.source_info());
18881888
if (supplied_special_p)
18891889
++special_binding_count;
1890-
else
1891-
ibindings << Cons_O::createList(supplied_var, gc::As_assert<LexicalVarInfo_sp>(var_info(supplied_var, new_env))->lex(), context.source_info());
1890+
else if (supplied_var.notnilp()){
1891+
T_sp lexvarinfo = var_info(supplied_var, new_env);
1892+
ibindings << Cons_O::createList(supplied_var, gc::As_assert<LexicalVarInfo_sp>(lexvarinfo)->lex(), context.source_info());
1893+
}
18921894
}
18931895
}
18941896
// Generate defaulting code for key args, and special-bind them if necessary
@@ -1910,7 +1912,7 @@ void compile_with_lambda_list(T_sp lambda_list, List_sp body, Lexenv_sp env, con
19101912
ibindings << Cons_O::createList(key_var, varinfo->lex(), context.source_info());
19111913
if (supplied_special_p)
19121914
++special_binding_count;
1913-
else
1915+
else if (supplied_var.notnilp())
19141916
ibindings << Cons_O::createList(supplied_var, gc::As_assert<LexicalVarInfo_sp>(var_info(supplied_var, new_env))->lex(), context.source_info());
19151917
}
19161918
}

0 commit comments

Comments
 (0)