SAMType

object SAMType

An extractor for single abstract method types. A type is a SAM type if it is a reference to a class or trait, which

  • has a single abstract method with a method type (ExprType and PolyType not allowed!) whose result type is not an implicit function type and which is not marked inline.
  • can be instantiated without arguments or with just () as argument.

The pattern SAMType(sam) matches a SAM type, where sam is the type of the single abstract method.

class Object
trait Matchable
class Any
SAMType.type

Value members

Concrete methods

def zeroParamClass(tp: Type)(using Context): Type