I use the 'toArray' api of immutable.Stack like the codes below in Scala, but it reports error.
var stack1 = mutable.Stack[Long]()
val array = stack1.toArray();
It reports 'Cannot resolve reference toArray with such signature' about toArray and "unspecified value parameters" about the '()' of toArray() !