From cfe257495a025fe13087b7d65b6a37d1e87c4a3d Mon Sep 17 00:00:00 2001 From: Mark Thom Date: Mon, 10 Jan 2022 21:18:11 -0700 Subject: [PATCH] recognize characters as separate from atoms in ''/7 (#1192) --- src/machine/system_calls.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/machine/system_calls.rs b/src/machine/system_calls.rs index 800693af..71208ce4 100644 --- a/src/machine/system_calls.rs +++ b/src/machine/system_calls.rs @@ -2947,7 +2947,17 @@ impl Machine { }; let unossified_op_dir = if !orig_op.is_var() { - let orig_op = cell_as_atom!(orig_op); + let orig_op = read_heap_cell!(orig_op, + (HeapCellValueTag::Atom, (name, _arity)) => { + name + } + (HeapCellValueTag::Char, c) => { + self.machine_st.atom_tbl.build_with(&c.to_string()) + } + _ => { + unreachable!() + } + ); let op_descs = [ self.indices.op_dir.get_key_value(&(orig_op, Fixity::In)), -- 2.54.0