Undo eta expansion for parameterless and nullary methods
Transform a function node (x => body) of type PartialFunction[T, R] where body = expr match { case P_i if G_i => E_i }_i=1.
Transform a function node (x => body) of type PartialFunction[T, R] where body = expr match { case P_i if G_i => E_i }_i=1..n to (assuming none of the cases is a default case):
class $anon() extends AbstractPartialFunction[T, R] with Serializable { def applyOrElse[A1 <: A, B1 >: B](x: A1, default: A1 => B1): B1 = (expr: @unchecked) match { case P_1 if G_1 => E_1 ... case P_n if G_n => E_n case _ => default(expr) } def isDefinedAt(x: T): boolean = (x: @unchecked) match { case P_1 if G_1 => true ... case P_n if G_n => true case _ => false } } new $anon()
If there's a default case, the original match is used for applyOrElse, and isDefinedAt returns true
Transform a function node (x_1,.
Transform a function node (x_1,...,x_n) => body of type FunctionN[T_1, .., T_N, R] to
class $anon() extends AbstractFunctionN[T_1, .., T_N, R] with Serializable { def apply(x_1: T_1, ..., x_N: T_n): R = body } new $anon()
If settings.XoldPatmat.value
, also synthesized AbstractPartialFunction subclasses (see synthPartialFunction).
Uncurry a type of a tree node.
Uncurry a type of a tree node. This function is sensitive to whether or not we are in a pattern -- when in a pattern additional parameter sections of a case class are skipped.
(unCurryTransformer: StringAdd).self
(unCurryTransformer: StringFormat).self
(unCurryTransformer: ArrowAssoc[UnCurryTransformer]).x
(Since version 2.10.0) Use leftOfArrow
instead
(unCurryTransformer: Ensuring[UnCurryTransformer]).x
(Since version 2.10.0) Use resultOfEnsuring
instead