Open afd opened 5 years ago
To document for later: this issue will require #540 to be fixed first, as OpaqueExpressionGenerator doesn't have any way of knowing the components of a struct just from its type name, since structs are declared in global scope and Typer is the only tree builder capable of storing struct declarations.
Related to #510, it would be good to have a similar transformation that re-writes structs, applying an identity recursively to some field of a struct.
For example, if we have:
struct S { int a; float b; vec3 c; }
S p;
then we could transform p into e.g. S(p.a, IDENTITY(p.b), p.c)