Skip to content
This repository has been archived by the owner on Feb 6, 2025. It is now read-only.

Addition assignment +=, also -= trigger error "attempt to subtract with underflow"? #142

Open
robert-chiniquy opened this issue Mar 30, 2021 · 0 comments

Comments

@robert-chiniquy
Copy link

Here's the error I'm hitting, which also shows the GLSL excerpt that triggers it:

error: proc macro panicked

   |
38 |       let gtu = glsl! {
   |  _______________^
39 | |         void main() {
40 | |             vec4 fc = vec4(1.0, 1.0, 1.0, 1.0);
41 | |             fc -= 0.1;
42 | |             gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
43 | |         }
44 | |     };
   | |_____^
   |
   = help: message: attempt to subtract with overflow

The error is the same with +=, but it is resolved if I change the shader to i.e. fc = fc - 0.1;. Are these assignment operators supported by the parser?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant