From aaf8d6f991b872d763820b718ba2b4d29fc4c550 Mon Sep 17 00:00:00 2001 From: Iwo Plaza Date: Wed, 29 Apr 2026 18:33:00 +0200 Subject: [PATCH] fix: Keep internal accessor slot unnamed, even after code transforms --- packages/typegpu/src/core/slot/accessor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/typegpu/src/core/slot/accessor.ts b/packages/typegpu/src/core/slot/accessor.ts index 96b611f6bd..f8cdd39b3c 100644 --- a/packages/typegpu/src/core/slot/accessor.ts +++ b/packages/typegpu/src/core/slot/accessor.ts @@ -21,7 +21,7 @@ import { } from '../../types.ts'; import { isTgpuFn } from '../function/tgpuFn.ts'; import { getGpuValueRecursively, valueProxyHandler } from '../valueProxyUtils.ts'; -import { slot as slotConstructor } from './slot.ts'; +import { slot } from './slot.ts'; import type { TgpuAccessor, TgpuMutableAccessor, TgpuSlot } from './slotTypes.ts'; // ---------- @@ -72,7 +72,7 @@ abstract class AccessorBase< this.defaultValue = defaultValue; // NOTE: in certain setups, unplugin can run on package typegpu, so we have to avoid auto-naming triggering here - this.slot = slotConstructor(defaultValue); + this.slot = (() => slot(defaultValue))(); this[$getNameForward] = this.slot; }