]> Repositorios git - scryer-prolog.git/commitdiff
properly copy already-copied attributed variables as shallow members of lists
authorMark Thom <[email protected]>
Tue, 5 Feb 2019 06:04:31 +0000 (23:04 -0700)
committerMark Thom <[email protected]>
Tue, 5 Feb 2019 06:04:31 +0000 (23:04 -0700)
src/prolog/copier.rs

index a635ff764dc9d59841aa8d32f406e84d5e27e4ae..5c918d5a45fd1ea8da8114fbb5e74f974d7cda7b 100644 (file)
@@ -89,7 +89,7 @@ pub(crate) trait CopierTarget: IndexMut<usize, Output=HeapCellValue>
                             let rd = self.store(self.deref(ra));
 
                             match rd.clone() {
-                                Addr::HeapCell(hc) if hc >= old_h =>
+                                Addr::AttrVal(h) | Addr::HeapCell(h) if h >= old_h =>
                                     self[threshold] = HeapCellValue::Addr(rd),
                                 ra @ Addr::AttrVar(_) | ra @ Addr::HeapCell(..) | ra @ Addr::StackCell(..) =>
                                     if ra == rd {