Skip to content

Keep static on an extern member inside a type - #3517

Merged
nojaf merged 1 commit into
fsprojects:mainfrom
nojaf:fix-3515
Oct 5, 2026
Merged

nojaf merged 1 commit into
fsprojects:mainfrom
nojaf:fix-3515

Conversation

@nojaf

@nojaf nojaf commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

The Oak had no place for the static of static extern, so formatting dropped it and changed the declaration. The parser only sets the static flag on the member: it keeps no range for the keyword.

ExternBindingNode now has an optional Static node. Without attributes static is where the member starts. After attributes the transformer finds it in the source before extern, so comments around it stay where they were. The node's range now includes static. The case that pinned the bug as ignored now runs as a regular negative case.

The changelog's Unreleased section becomes 8.0.7.

Fixes #3515

The Oak had no place for the `static` of `static extern`, so
formatting dropped it and changed the declaration. The parser only
sets the static flag on the member: it keeps no range for the keyword.

ExternBindingNode now has an optional Static node. Without attributes
`static` is where the member starts. After attributes the transformer
finds it in the source before `extern`, so comments around it stay
where they were. The node's range now includes `static`. The case
that pinned the bug as ignored now runs as a regular negative case.

The changelog's Unreleased section becomes 8.0.7.

Fixes fsprojects#3515
@nojaf
nojaf merged commit 13099e4 into fsprojects:main Oct 5, 2026
13 checks passed
@nojaf
nojaf deleted the fix-3515 branch October 5, 2026 12:02
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.

static extern inside a type loses static

1 participant