Scala error 'multiple overloaded alternatives of constructor [PDF]

Apr 26, 2014 - So far, Scala 2.11 the most painless major version increment I've seen. Most of my projects compile with

10 downloads 21 Views 27KB Size

Recommend Stories


Manualul inginerului constructor pdf
Courage doesn't always roar. Sometimes courage is the quiet voice at the end of the day saying, "I will

PdF Scala Cookbook
And you? When will you begin that long journey into yourself? Rumi

Scala Sockelleisten Scala Skirts
You often feel tired, not because you've done too much, but because you've done too little of what sparks

Code Cube Constructor
So many books, so little time. Frank Zappa

Alternatives
What we think, what we become. Buddha

Alternatives
Be who you needed when you were younger. Anonymous

PDF Descartes Error
You often feel tired, not because you've done too much, but because you've done too little of what sparks

Beaufort Scala
Come let us be friends for once. Let us make life easy on us. Let us be loved ones and lovers. The earth

varieties of alternatives
Ego says, "Once everything falls into place, I'll feel peace." Spirit says "Find your peace, and then

scala beaufort del vento
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

Comments

© 2018 Chris Stucchio · Powered by pelican-bootstrap3 (https://github.com/DandyDev/pelican-bootstrap3), Pelican (http://docs.getpelican.com/), Bootstrap (http://getbootstrap.com)

Back to top

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.