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