]> git.xonotic.org Git - xonotic/gmqcc.git/commit
catch broken vector member access
authorWolfgang Bumiller <wry.git@bumiller.com>
Sun, 14 Jan 2018 09:58:29 +0000 (10:58 +0100)
committerWolfgang Bumiller <wry.git@bumiller.com>
Sun, 14 Jan 2018 09:58:29 +0000 (10:58 +0100)
commit97a74eb677071f3a73a07f940cc5c6ea1c9b2e4b
treeb607cd28c614a28a2627c5619b5d552244ede9e2
parentf84c8ea62922f20b13e54916fac849ade0886b66
catch broken vector member access

These kinds of expressions currently cannot be handled
without pionter support in the qcvm without scanning the
ast from within ast_member::codegen for an assignments as
seen in the added test case.

This change makes code like that return a pointer type which
will cause an error that we did not get a vector or field
back. With pointer support this pointer could actually be
used instead.

So at least it shouldn't silently produce broken code
anymore.

Signed-off-by: Wolfgang Bumiller <wry.git@bumiller.com>
ast.cpp
tests/vecfields-broken.tmpl [new file with mode: 0644]
tests/vecfields.qc