diff --git a/src/compiler/iml/imlvalue.rs b/src/compiler/iml/imlvalue.rs index a8001fb..914ecbe 100644 --- a/src/compiler/iml/imlvalue.rs +++ b/src/compiler/iml/imlvalue.rs @@ -491,7 +491,7 @@ impl std::hash::Hash for ImlValue { } Self::Parselet(parselet) => { state.write_u8('p' as u8); - parselet.hash(state); + parselet.borrow().id().hash(state); } other => unreachable!("{:?} is unhashable", other), } diff --git a/tests/parselet_generic_selfref.tok b/tests/parselet_generic_selfref.tok index dbd16f6..f8d9f5b 100644 --- a/tests/parselet_generic_selfref.tok +++ b/tests/parselet_generic_selfref.tok @@ -3,8 +3,7 @@ Assignment : @ { Expression ast("value") } -# HoldAssignment : Assignment # fails with endless recursion! -HoldAssignment : Assignment Empty # workaround! +HoldAssignment : Assignment # ast_print(Assignment) ast_print(HoldAssignment)