GPU: Shader Tool: Add error on invalid resource_table usage

This commit is contained in:
Clément Foucault 2026-03-25 14:51:08 +01:00
parent cdccdfcd4d
commit cb7770b1aa

View file

@ -53,6 +53,9 @@ void SourceProcessor::lower_srt_accessor_templates(Parser &parser)
if (array.is_valid()) {
report_error_(ERROR_TOK(name), "[[resource_table]] members cannot be arrays.");
}
if (name.prev() == '&') {
report_error_(ERROR_TOK(name.prev()), "[[resource_table]] members cannot be references.");
}
/* Remove the template but not the wrapped type. */
parser.erase(type);