Handled case when variable declaration contains initialization.
BUG=26
Review URL: http://codereview.appspot.com/2213049

git-svn-id: https://angleproject.googlecode.com/svn/trunk@441 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/VariableInfo.cpp b/src/compiler/VariableInfo.cpp
index 5884ede..75cdbf9 100644
--- a/src/compiler/VariableInfo.cpp
+++ b/src/compiler/VariableInfo.cpp
@@ -171,9 +171,7 @@
         break;
     case EOpDeclaration: {
         const TIntermSequence& sequence = node->getSequence();
-        const TIntermSymbol* variable = sequence.front()->getAsSymbolNode();
-        const TType& type = variable->getType();
-        TQualifier qualifier = type.getQualifier();
+        TQualifier qualifier = sequence.front()->getAsTyped()->getQualifier();
         if (qualifier == EvqAttribute || qualifier == EvqUniform)
         {
             TVariableInfoList& infoList = qualifier == EvqAttribute ?
@@ -181,7 +179,13 @@
             for (TIntermSequence::const_iterator i = sequence.begin();
                  i != sequence.end(); ++i)
             {
-                variable = (*i)->getAsSymbolNode();
+                const TIntermSymbol* variable = (*i)->getAsSymbolNode();
+                // The only case in which the sequence will not contain a
+                // TIntermSymbol node is initialization. It will contain a
+                // TInterBinary node in that case. Since attributes and unifroms
+                // cannot be initialized in a shader, we must have only
+                // TIntermSymbol nodes in the sequence.
+                ASSERT(variable != NULL);
                 getVariableInfo(variable->getType(), variable->getSymbol(),
                                 infoList);
             }