Merge pull request #2233 from aarroyoc/fix-functor-2214

Throw ValidType::Atom error in functor
This commit is contained in:
Mark Thom
2023-12-17 20:20:50 -07:00
committed by GitHub

View File

@@ -1450,10 +1450,15 @@ impl MachineState {
a1.as_var().unwrap(), a1.as_var().unwrap(),
); );
} }
(HeapCellValueTag::Cons | HeapCellValueTag::Fixnum |
HeapCellValueTag::F64) if arity != 0 => {
let err = self.type_error(ValidType::Atom, store_name);
return Err(self.error_form(err, stub_gen())); // 8.5.1.3 e)
}
_ => { _ => {
let err = self.type_error(ValidType::Atomic, store_name); let err = self.type_error(ValidType::Atomic, store_name);
return Err(self.error_form(err, stub_gen())); return Err(self.error_form(err, stub_gen())); // 8.5.1.3 c)
} // 8.5.1.3 c) }
); );
} }
_ => { _ => {