Fixed symbol->keyword added type for the class handle in the test

This commit is contained in:
FelixBrendel
2019-03-15 12:58:23 +01:00
parent 31a833b5c9
commit fac0ed352d
6 changed files with 42 additions and 85 deletions
+2 -3
View File
@@ -339,7 +339,7 @@ proc load_built_ins_into_environment(Environment* env) -> void {
});
defun("assert", cLambda {
int arguments_length;
debug_break();
try {
arguments = eval_arguments(arguments, env, &arguments_length);
}
@@ -872,7 +872,6 @@ proc load_built_ins_into_environment(Environment* env) -> void {
assert_type(type, Lisp_Object_Type::Keyword);
}
evaluated_arguments->value.pair->first->userType = type;
return type;
});
@@ -1164,7 +1163,7 @@ proc load_built_ins_into_environment(Environment* env) -> void {
report_error(Error_Type::Type_Missmatch);
}
return Memory::get_or_create_lisp_object_keyword(source->value.string);
return Memory::get_or_create_lisp_object_keyword(source->value.symbol->identifier);
});
defun("string->symbol", cLambda {
+5
View File
@@ -42,6 +42,11 @@ proc apply_arguments_to_function(Lisp_Object* arguments, Function* function) ->
}
}
if (!accepted) {
// TODO(Felix): if we are actually done with all the
// necessary keywords then we have to count the rest
// as :rest here, instead od always creating an error
// (special case with default variables)
puts("??");
create_error(Error_Type::Ill_Formed_Arguments, arguments->sourceCodeLocation);
return nullptr;
}