|
Scala example source code file (bug1357.scala)
The Scala bug1357.scala source code
object NonEmptyCons {
def unapply[H, T](c: (H, T)): Option[(H, T)] = Some(c)
}
object Main {
type BT[+H, +T <: Tuple2[Tuple2[H, T], Tuple2[H, T]]] = Tuple2[H, T]
// type T = Tuple2[String,String]
type BinaryTree[+E] = BT[E, T forSome { type T <: Tuple2[BT[E, T], BT[E, T]] }]
def foo[E](tree: BinaryTree[E]): Unit = tree match {
case NonEmptyCons(_, tail) => {
tail match {
case NonEmptyCons(_, _) => {
}
}
}
}
}
Other Scala examples (source code examples)Here is a short list of links related to this Scala bug1357.scala source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.