This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/examplefiles/scala/inheritance.scala
2021-03-01 11:39:20 +01:00

11 lines
No EOL
220 B
Scala

// Extends
trait A extends B
trait A extends (B => B){}
trait Color
object Red extends Color
// Derives
enum Tree[T] derives Eq, Ordering, Show {
case Branch[T](left: Tree[T], right: Tree[T])
case Leaf[T](elem: T)
}