diff options
Diffstat (limited to 'tests/patmat/t7353.scala')
-rw-r--r-- | tests/patmat/t7353.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/patmat/t7353.scala b/tests/patmat/t7353.scala new file mode 100644 index 000000000..7a8fea115 --- /dev/null +++ b/tests/patmat/t7353.scala @@ -0,0 +1,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 + } +}
\ No newline at end of file |