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

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

@robert-chiniquy

Description

@robert-chiniquy

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions