ccrma / chuck

ChucK Music Programming Language
http://chuck.stanford.edu/
GNU General Public License v2.0
803 stars 128 forks source link

++ on vec3 fields (e.g., .x) yields internal emitter error #379

Closed gewang closed 11 months ago

gewang commented 11 months ago
// a vec3
vec3 v3;
// increment x field
v3.x++;

error

c.ck:4:1: error: (emit): internal error: unhandled type 'float' for post '++' operator
[4] v3.x++;
    ^
gewang commented 11 months ago

issue due to type checker allowing ++ on floats, but the emitter does have code to handle, resulting in an internal error. Two possible remedies: create post/preinc_float instructions OR disallow ++ on floats in type checker. 3e01ba5 does the latter.