Chapter 5, Exercise 3
This one's very similar in Scala to the Java version...
c5x3a.scala:
package x;
import java.util.Vector;
import c5x3v.Vector;
object c5x3a {
def main ( args: Array[String] ) = {
var v = new Vector;
}
}
c5x3v.scala:
package c5x3v;
class Vector {
var size : Int = _;
}
Gets me this error, quite similar to what Java says:
c5x3a.scala:7: reference to Vector is ambiguous;
it is imported twice in the same scope by
import c5x3v.{Vector}
and import java.util.{Vector}
var v = new Vector;
^
one error found
11:33:45 PM