buzz
buzz copied to clipboard
Deep List/Map as default values
List and maps provided as default function argument or default object property value are cloned at runtime. We don't allow list/map containing themselves list and maps. We could allow it by doing a deep clone rather than a shallow one. It could be costly if user provides a very deep default value but we could argue that this is unlikely.