Skip to content

Commit

Permalink
Don't use raw.arena to replace the layout. It causes cyclic arena
Browse files Browse the repository at this point in the history
references.
  • Loading branch information
rintaro committed Aug 9, 2022
1 parent b230b79 commit a3e87ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/SwiftSyntax/SyntaxData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ struct SyntaxData {
/// syntax data.
/// - SeeAlso: replacingSelf(_:)
func replacingChild(_ child: RawSyntax?, at index: Int) -> SyntaxData {
let newRaw = raw.replacingChild(at: index, with: child, arena: raw.arena)
let newRaw = raw.replacingChild(at: index, with: child, arena: .default)
return replacingSelf(newRaw)
}

Expand Down

0 comments on commit a3e87ba

Please sign in to comment.