Index: src/ResolvExpr/CommonType.cc
===================================================================
--- src/ResolvExpr/CommonType.cc	(revision 92f5279765056ffb48eeb946fe0fbe43bd7d563b)
+++ src/ResolvExpr/CommonType.cc	(revision b604426f64e13d3a4ed56bc2426e4384de382a1d)
@@ -939,5 +939,5 @@
 			ast::ptr< ast::Type > result;
 			const ast::ReferenceType * ref1 = type1.as< ast::ReferenceType >();
-			const ast::ReferenceType * ref2 = type1.as< ast::ReferenceType >();
+			const ast::ReferenceType * ref2 = type2.as< ast::ReferenceType >();
 			
 			if ( depth1 > depth2 ) {
