aboutsummaryrefslogblamecommitdiff
path: root/tests/patmat/t7353.scala
blob: 7a8fea115fc492c650cfdeddcb1a70897bf09c7e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                     
sealed trait EthernetType

object EthernetType {
  final case object Gigabit extends EthernetType
  final case object FastEthernet extends EthernetType

  final def toInt(t: EthernetType) = t match {
    case Gigabit => 1
    case FastEthernet => 2
  }
}