OrNull

dotty.tools.dotc.core.Types$.OrNull$
object OrNull

An extractor object to pattern match against a nullable union. e.g.

(tp: Type) match case OrNull(tp1) => // tp had the form tp1 | Null case _ => // tp was not a nullable union

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
OrNull.type

Members list

Concise view

Value members

Concrete methods

def apply(tp: Type)(using Context): Type
def unapply(tp: Type)(using Context): Option[Type]