t

scala.tools.nsc.typechecker

PatternTypers

trait PatternTypers extends AnyRef

A pattern match such as

x match { case Foo(a, b) => ...}

Might match an instance of any of the following definitions of Foo. Note the analogous treatment between case classes and unapplies.

case class Foo(xs: Int*) case class Foo(a: Int, xs: Int*) case class Foo(a: Int, b: Int) case class Foo(a: Int, b: Int, xs: Int*)

object Foo { def unapplySeq(x: Any): Option[Seq[Int]] } object Foo { def unapplySeq(x: Any): Option[(Int, Seq[Int])] } object Foo { def unapply(x: Any): Option[(Int, Int)] } object Foo { def unapplySeq(x: Any): Option[(Int, Int, Seq[Int])] }

Self Type
Analyzer
Source
PatternTypers.scala
Linear Supertypes
AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PatternTypers
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait PatternTyper extends AnyRef