diff --git a/src/libs/glsl/glslsemantic.cpp b/src/libs/glsl/glslsemantic.cpp
index 1be3c486a738df3c89e9d4c7d5f02431950a59e0..35496f11fa6c30683de5612a84f666aa3ade6111 100644
--- a/src/libs/glsl/glslsemantic.cpp
+++ b/src/libs/glsl/glslsemantic.cpp
@@ -575,8 +575,7 @@ bool Semantic::visit(NamedTypeAST *ast)
     if (ast->name) {
         if (Symbol *s = _scope->lookup(*ast->name)) {
             if (Struct *ty = s->asStruct()) {
-                _expr.type = ty;
-                _expr.isConstant = false;
+                _type = ty;
                 return false;
             }
         }
@@ -613,7 +612,7 @@ bool Semantic::visit(StructTypeAST *ast)
 
 bool Semantic::visit(QualifiedTypeAST *ast)
 {
-    accept(ast->type);
+    _type = type(ast->type);
     for (List<LayoutQualifier *> *it = ast->layout_list; it; it = it->next) {
         LayoutQualifier *q = it->value;
         // q->name;