mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-25 00:41:07 +01:00
Previously we always set the lhs flag when lowering to generate a pointer so that dynamic indexing would work, this would produce an error on constant variables since they can't be in a lhs context. Now we introduce an enum which distinguishes not only between lhs and rhs but also in array base, if lowering in a lhs context the base is also lowered in a lhs context but if lowering in rhs the base is lowered in a special array base context which bypasses the mutability check. Fixes #1237