We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 36482ae + 019355d commit fb3f6e2Copy full SHA for fb3f6e2
Sources/SwiftSyntax/SyntaxArena.swift
@@ -123,11 +123,7 @@ public class SyntaxArena {
123
precondition(
124
!self.hasParent,
125
"an arena can't have a new child once it's owned by other arenas")
126
- // `precondition(!self.hasParent)` should be sufficient to make sure we
127
- // don’t add retain cycles between syntax arenas, but to be doubly sure,
128
- // check the child arenas as well in debug builds.
129
- assert(!other.contains(arena: self), "cyclic arena hierarchy detected")
130
-
+
131
other.hasParent = true
132
children.insert(other)
133
}
0 commit comments