unify empty list to '' in atom_chars/2 (#1334, #1336)

This commit is contained in:
Mark Thom
2022-03-08 18:25:40 -07:00
parent 8762647b55
commit ecebaf8216

View File

@@ -1288,7 +1288,11 @@ impl Machine {
if let Some(str_like) = self.machine_st.value_to_str_like(a2) {
let atom = match str_like {
AtomOrString::Atom(atom) => {
atom
if atom == atom!("[]") {
self.machine_st.atom_tbl.build_with("")
} else {
atom
}
}
AtomOrString::String(string) => {
self.machine_st.atom_tbl.build_with(&string)