Disallow arrays in initializers for non-array-object versions (assignment, etc. were already caught, but not initialization).

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24022 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-11-12 22:02:36 +00:00
parent 029d746bad
commit ffa66d3bc7
4 changed files with 10 additions and 2 deletions

View file

@ -2927,6 +2927,7 @@ TIntermNode* TParseContext::executeInitializer(TSourceLoc loc, TString& identifi
error(loc, " cannot initialize this type of qualifier ", variable->getType().getStorageQualifierString(), "");
return 0;
}
arrayObjectCheck(loc, variable->getType(), "array initializer");
//
// If the initializer was from braces { ... }, we convert the whole subtree to a