Add notion of "unbound" variability to the type system.
Now, when a type is declared without an explicit "uniform" or "varying" qualifier, its variability is unbound; depending on the context of the declaration, the variability is later finalized. Currently, in almost all cases, types with unbound variability are resolved to varying types; the one exception is typecasts like: "(int)1"; in this case, the fact that (int) has unbound variability carries through to the TypeCastExpr, which in turn notices that the expression being type cast has uniform type and in turn will resolve (int) to (uniform int). Fixes issue #127.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Can't convert argument of type "void * const uniform" to type "float" for funcion call argument.
|
||||
// Can't convert argument of type "void * uniform" to type "float" for function call argument.
|
||||
|
||||
float bar(float a, float b);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user