Skip to content

AtomicFunctionNode: Fix return types#2128

Merged
Methuselah96 merged 6 commits intothree-types:masterfrom
thelazylamaGit:AtomicFunctionNodeFix
May 2, 2026
Merged

AtomicFunctionNode: Fix return types#2128
Methuselah96 merged 6 commits intothree-types:masterfrom
thelazylamaGit:AtomicFunctionNodeFix

Conversation

@thelazylamaGit
Copy link
Copy Markdown
Contributor

@thelazylamaGit thelazylamaGit commented Apr 23, 2026

When working with atomic nodes such as

const count = float(atomicLoad(trailCounts.element(idx)))

typescript would complain because AtomicFunctionNode wasn't typed <'uint'> properly

No overload matches this call.
Overload 1 of 2, '(value?: number | undefined): VarNode<"float", ConstNode<"float", number>>', gave the following error. Argument of type 'AtomicFunctionNode' is not assignable to parameter of type 'number'.

this PR fixes the issue having it return

atomicLoad<"uint">(pointerNode: Node<"uint">): AtomicFunctionNode<"uint">

instead of

atomicLoad(pointerNode: Node): AtomicFunctionNode

Copy link
Copy Markdown
Contributor

@Methuselah96 Methuselah96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Methuselah96 Methuselah96 merged commit b7764f1 into three-types:master May 2, 2026
6 checks passed
@thelazylamaGit thelazylamaGit deleted the AtomicFunctionNodeFix branch May 2, 2026 13:49
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.

2 participants