You're not going to master the rest of your life in one day. Just relax. Master the day. Than just keep
Idea Transcript
Scala error 'multiple overloaded alternatives of constructor RandomAccessFile define default arguments.' (https://www.chrisstucchio.com/blog/2014/multiple_overloaded_alternative Sat 26 April 2014 scala (https://www.chrisstucchio.com/tag/scala.html) / scala 2.11 (https://www.chrisstucchio.com/tag/scala-211.html) Follow @stucchio
Tweet
Get notified of new posts
So far, Scala 2.11 the most painless major version increment I've seen. Most of my projects compile with no problem. The following is one of the few actual errors I've run into: [error] /home/stucchio/src/breeze/src/main/scala/breeze/linalg/DenseMatrix.scala:51: in class DenseMatrix, multiple overloaded alternatives of constructor DenseMatrix define default arguments. [error] final class DenseMatrix[@specialized(Int, Float, Double) V](val rows: Int,
Apparently 2.11 is being stricter about default arguments in constructors. The fix is fairly straightforward. In 2.10, your code might look like this: def this(rows: Int, data: Array[V], offset: Int = 0) = ...
In 2.11, you need to do this: def this(rows: Int, data: Array[V], offset: Int) = ... def this(rows: Int, data: Array[V]) = this(rows, data, offset)
Just throwing this out there in case someone is googling.
Subscribe to the mailing list Email Address Subscribe