summaryrefslogtreecommitdiff
path: root/test/files/run/t4080.scala
blob: 1d1418847d61b4cd7909efeddf51209c7f695457 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import scala.collection.mutable.LinkedList
import java.util.NoSuchElementException

object Test {
  def main(args: Array[String]) {
    val ll = LinkedList(1, 2, 3)
    ll.insert(LinkedList(0))
    println(ll)
    val ll2 = LinkedList[Int]()
    try println("Empty head? " + ll2.head)
    catch { case _: NoSuchElementException => () }
  }
}