Skip to content

Commit 8308ba7

Browse files
committed
missing braces
1 parent 7780f13 commit 8308ba7

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/typegpu/src/std/boolean.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export const not = dualImpl({
237237

238238
if (isVec(dataType)) {
239239
const vecConstructorStr = `vec${dataType.componentCount}<bool>`;
240-
return stitch`!${vecConstructorStr}(${arg})`;
240+
return stitch`!(${vecConstructorStr}(${arg}))`;
241241
}
242242

243243
throw new Error(

packages/typegpu/tests/std/boolean/not.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ describe('not', () => {
8686
return not(v);
8787
});
8888
expect(tgpu.resolve([testFn])).toMatchInlineSnapshot(`
89-
"fn testFn(v: vec3f) -> vec3<bool> {
90-
return !vec3<bool>(v);
91-
}"
92-
`);
89+
"fn testFn(v: vec3f) -> vec3<bool> {
90+
return !(vec3<bool>(v));
91+
}"
92+
`);
9393
});
9494

9595
it('evaluates at compile time for comptime-known arguments', () => {

0 commit comments

Comments
 (0)