Skip to content

SYNG3004 - Overlapping replacements

Domain: ops
Severity: INTERNAL

Two or more replacements would modify overlapping regions of source code.

This error indicates that the replacement engine detected edits that would overlap in the source file. This is typically an internal error - the query engine should not produce overlapping matches for replacement.

If you encounter this error, please report it as a bug.

Example

clojure
(:replace (call) "x")

Given nested calls, both foo(bar()) and bar() match (call). Replacing both would produce conflicting edits since bar() is contained within foo(bar()).

Solution

This is an internal error. The query engine should prevent overlapping matches from reaching the replacement stage. Please report this as a bug with your query and a sample of the input that triggered it.

SYNG3001, SYNG3005

Copyright © 2022-present Semantic Works, Inc.