Skip to content

Commit

Permalink
Merge pull request #2233 from aarroyoc/fix-functor-2214
Browse files Browse the repository at this point in the history
Throw ValidType::Atom error in functor
  • Loading branch information
mthom authored Dec 18, 2023
2 parents e4f6458 + d132227 commit 1362456
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/machine/machine_state_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1450,10 +1450,15 @@ impl MachineState {
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);
return Err(self.error_form(err, stub_gen()));
} // 8.5.1.3 c)
return Err(self.error_form(err, stub_gen())); // 8.5.1.3 c)
}
);
}
_ => {
Expand Down

0 comments on commit 1362456

Please sign in to comment.