In the following example the type :: has two type parameters and therefore can be shown in infix notation. Because most of the time infix notation is easier to read, this notation should be chosen by the hover.
object X extends App {
trait HList
case class ::[+A, +B <: HList](head: A, tail: B) extends HList
case object HNil extends HList
val xs = ::(0, ::("", HNil))
// type shown as:
// ::[Int, ::[String, HNil]]
// instead it should be shown as:
// Int :: String :: HNil.type
}
Leave a comment
on 2014-12-28 17:25 *
By Simon Schäfer
Summary changed from Hover should show types in infix notation to Hover should show types with two type parameters in infix notation
on 2014-12-28 17:26 *
By Simon Schäfer
Description changed from In the following example th... to In the following example th...
No file chosen
You have an empty file field. Please select or remove it.
Name | Size |
---|