Index: src/ResolvExpr/CommonType.cc
===================================================================
--- src/ResolvExpr/CommonType.cc	(revision 9ea38de4515063905b11e8dd973b76e59c7671a8)
+++ 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 ) {
