@SuppressWarnings("unchecked")
final Mutable<QName, Y, Z> ret = (Mutable<QName, Y, Z>) copySubstatement((Mutable<?, ?, ?>) template)
- .orElseThrow(() -> new InferenceException(sourceReference(),
- "Failed to materialize child %s template %s", qname, template));
+ .orElseThrow(
+ () -> new InferenceException(this, "Failed to materialize child %s template %s", qname, template));
ensureCompletedPhase(ret);
addMaterialized(template, ret);
verify(substatements != SWEPT_SUBSTATEMENTS, "Attempted to access substatements of %s", this);
}
+ @Override
+ void markNoParentRef() {
+ final Object local = substatements;
+ if (local != null) {
+ markNoParentRef(castEffective(local));
+ }
+ }
+
@Override
int sweepSubstatements() {
final Object local = substatements;