Fix ambiguous instantiation
diff --git a/test/sparse_basic.cpp b/test/sparse_basic.cpp
index e8ebd70..d8e42e9 100644
--- a/test/sparse_basic.cpp
+++ b/test/sparse_basic.cpp
@@ -438,7 +438,7 @@
     {
       Index i = internal::random<Index>(0,rows-1);
       Index j = internal::random<Index>(0,rows-1);
-      Index v = internal::random<Scalar>();
+      Scalar v = internal::random<Scalar>();
       m1.coeffRef(i,j) = v;
       refMat1.coeffRef(i,j) = v;
       VERIFY_IS_APPROX(m1, refMat1);