Skip to content

Fix Go local type scope in quick scanner - #204

Merged
JohnXu22786 merged 1 commit into
mainfrom
bug/c25-03-fix-go-local-type-scope-r1
Sep 29, 2026
Merged

JohnXu22786 merged 1 commit into
mainfrom
bug/c25-03-fix-go-local-type-scope-r1

Conversation

@JohnXu22786

Copy link
Copy Markdown
Owner

What this PR does

Before this PR:

Go local type declarations were indexed as package symbols, truncating their enclosing function ranges and assigning later calls to the local type.

After this PR:

Track Go lexical brace depth and add only package-scope type declarations as symbols. Regression tests cover function ranges, call ownership, and braces in comments and strings.

Type of change

Bug fix

Only package-scope type declarations should become symbols, so local declarations cannot shorten function ranges or take ownership of calls.
@JohnXu22786
JohnXu22786 marked this pull request as ready for review September 29, 2026 09:20
@JohnXu22786
JohnXu22786 merged commit a92d9dd into main Sep 29, 2026
2 checks passed
@JohnXu22786
JohnXu22786 deleted the bug/c25-03-fix-go-local-type-scope-r1 branch September 29, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant