add comparisons between partial strings and string constants (#263)

This commit is contained in:
Mark Thom
2020-02-22 00:51:27 -07:00
parent 545472f9c4
commit 003b4d0218
3 changed files with 16 additions and 3 deletions

View File

@@ -2204,6 +2204,13 @@ impl MachineState {
(HeapCellValue::Addr(Addr::PStrLocation(..)),
HeapCellValue::Addr(Addr::PStrLocation(..))) =>
continue,
(HeapCellValue::Addr(Addr::PStrLocation(..)),
HeapCellValue::Addr(Addr::Con(Constant::String(..))))
| (HeapCellValue::Addr(Addr::Con(Constant::String(..))),
HeapCellValue::Addr(Addr::PStrLocation(..)))
if self.flags.double_quotes.is_chars() => {
continue;
}
(HeapCellValue::Addr(Addr::Lis(_)), HeapCellValue::Addr(Addr::Lis(_))) =>
continue,
(HeapCellValue::Addr(Addr::Con(Constant::EmptyList)),