That's because you're calling the apply(int)
method from the Range
class. You should be calling apply(int,int)
from the companion object:
import scala.collection.immutable.Range$;
// ...
Range r = Range$.MODULE$.apply(0, 10)
See also this Q&A for general info.