cloneSet<E> method
Clones a Set with enforced nesting depth limit.
Throws LimitExceededException if the nesting limit is exceeded.
Implementation
@override
Set<E> cloneSet<E>(Set<E> source) {
if (_nestIndex > nestLimit) {
throw LimitExceededException('depth', _nestIndex);
}
_nestIndex++;
try {
return super.cloneSet<E>(source);
} finally {
_nestIndex--;
}
}