From d8a8f3a99680b0e82e214dbbe784b616aa9d19f0 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Tue, 27 Mar 2012 08:52:14 -0700 Subject: [PATCH] For symbols that are references, return uniform ptr type as lvalue type. Fixes issue #204. --- expr.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/expr.cpp b/expr.cpp index 17541012..cacbb312 100644 --- a/expr.cpp +++ b/expr.cpp @@ -7209,7 +7209,10 @@ SymbolExpr::GetLValueType() const { if (symbol == NULL) return NULL; - return PointerType::GetUniform(symbol->type); + if (dynamic_cast(symbol->type) != NULL) + return PointerType::GetUniform(symbol->type->GetReferenceTarget()); + else + return PointerType::GetUniform(symbol->type); }