Hm, I'm not sure this is directly connected to dependent types though? The example has
val securityRepresentation = R(numSecurities)
val pcaRepresentation = R(numSecurities)
and gives the error [error] found : securityRepresentation.V
[error] required: pcaRepresentation.V
But securityRepresentation and pcaRepresentation are the same thing! If the Scala typechecker was more agressive, it could deduce that these types are equal. (And in a pure language like Coq and Agda, this would compile).So I think this example is more about details of the Scala type system (nominal typing, coarseness of type equality) than about dependency as such.