Both ReturnStmt and DeclStmt now check the values being associated with references to make sure that they are legal (e.g. it's illegal to assign a varying lvalue, or a compile-time constant to a reference type). Previously we didn't catch this and would end up hitting assertions in LLVM when code did this stuff. Mostly fixes issue #225 (except for adding a FAQ about what this error message means.)
7 lines
153 B
Plaintext
7 lines
153 B
Plaintext
// Initializer for reference-type variable "x" must have a uniform lvalue type
|
|
|
|
float &func(uniform float a[], int i, float f) {
|
|
float &x = a[i];
|
|
}
|
|
|