]> git.tdb.fi Git - libs/gl.git/blobdiff - source/programcompiler.cpp
Allow redeclarations to override the type of a variable
[libs/gl.git] / source / programcompiler.cpp
index 13c73e4ac0a79694d4d50c7e37b14b6ffd69b1bb..aef17fa2369fdadc46366c7b4868751ba2d1fc1e 100644 (file)
@@ -478,6 +478,7 @@ void ProgramCompiler::DeclarationCombiner::visit(VariableDeclaration &var)
        VariableDeclaration *&ptr = variables[var.name];
        if(ptr)
        {
+               ptr->type = var.type;
                if(var.init_expression)
                        ptr->init_expression = var.init_expression;
                remove_node = true;