Types: Fix #1290: Rationalize and correct "mixed" style array dimensioning.
There a couple functional problems, which when reduced down also led to some good simplifications and rationalization. So, this commit: - corrects "mixed" functionality: int[A] f[B] -> f[B][A] - correct multi-identifier decls: int[A] f[B], g[C] -> f and g are independently sized. - increases symmetry between different places in the code that do this - makes fewer ways to do the same thing; several methods are just gone now - makes more clear when something is copied or shared
This commit is contained in:
parent
1c3ab274b1
commit
859b0342b8
17 changed files with 1323 additions and 1289 deletions
30
Test/mixedArrayDecls.frag
Normal file
30
Test/mixedArrayDecls.frag
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#version 450
|
||||
|
||||
struct S {
|
||||
int[3] a[2], b[5];
|
||||
};
|
||||
|
||||
S s;
|
||||
|
||||
int[5] c[4], d[8];
|
||||
int[9] e[], f[];
|
||||
int e[11][9];
|
||||
int f[13][9];
|
||||
|
||||
int[14] g[], h[];
|
||||
|
||||
int [14][15][6] foo(int[6] p[14][15]) { return p; }
|
||||
|
||||
void main()
|
||||
{
|
||||
g[3];
|
||||
h[2];
|
||||
}
|
||||
|
||||
float[4][3][2] bar() { float[3][2] a[4]; return a; }
|
||||
|
||||
in inbname {
|
||||
float[7] f[8][9];
|
||||
} inbinst[4][5][6];
|
||||
|
||||
float[3][2] barm[4]() { float[3][2] a[4]; return a; } // ERROR
|
||||
Loading…
Add table
Add a link
Reference in a new issue