Repro
tmp=$(mktemp -d /tmp/goboscript-stage-struct-used-sprite-XXXXXX)
printf 'costumes "blank.svg";\n\nstruct Point {\n x,\n y,\n}\n\nvar Point p = Point {\n x: 1,\n y: 2,\n};\n' > "$tmp/stage.gs"
printf 'costumes "blank.svg";\n\nonflag {\n say p.x;\n}\n' > "$tmp/main.gs"
printf '<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"></svg>\n' > "$tmp/blank.svg"
cargo run --quiet -- build "$tmp"
Observed:
warning: unused struct Point
warning: unused struct field x (never read)
warning: unused struct field y (never read)
p.x is read by the sprite script, but the stage struct and x field are still reported unused.
Expected
References from sprite scripts to stage/global struct variables should mark the stage struct and accessed field as used. In this repro, Point and Point.x should not warn as unused.
Repro
Observed:
p.xis read by the sprite script, but the stage struct andxfield are still reported unused.Expected
References from sprite scripts to stage/global struct variables should mark the stage struct and accessed field as used. In this repro,
PointandPoint.xshould not warn as unused.