Defn

object Defn
Companion:
class
class Object
trait Matchable
class Any
Defn.type

Type members

Classlikes

final case class Class(attrs: Attrs, name: Top, parent: Option[Top], traits: Seq[Top])(implicit pos: SourcePosition) extends Defn

The NIR representation of a Scala class.

The NIR representation of a Scala class.

final case class Const(attrs: Attrs, name: Member, ty: Type, rhs: Val)(implicit pos: SourcePosition) extends Defn

A unique, read-only instance of some type.

A unique, read-only instance of some type.

A constant definition is distinct from a constant literal, which would be represented by a Val.

final case class Declare(attrs: Attrs, name: Member, ty: Function)(implicit pos: SourcePosition) extends Defn

A method declaration.

A method declaration.

Methods of abstract classes and traits can be declared without a definition and are resolved at runtime through dynamic dispatch.

final case class Define(attrs: Attrs, name: Member, ty: Function, insts: Seq[Inst], debugInfo: DebugInfo)(implicit pos: SourcePosition) extends Defn

A method definition.

A method definition.

Companion:
object
object Define
Companion:
class
final case class Module(attrs: Attrs, name: Top, parent: Option[Top], traits: Seq[Top])(implicit pos: SourcePosition) extends Defn

The NIR representation of a Scala module.

The NIR representation of a Scala module.

final case class Trait(attrs: Attrs, name: Top, traits: Seq[Top])(implicit pos: SourcePosition) extends Defn

The NIR representation of a Scala trait.

The NIR representation of a Scala trait.

final case class Var(attrs: Attrs, name: Member, ty: Type, rhs: Val)(implicit pos: SourcePosition) extends Defn

A variable definition corresponding to either a field in class or module, or to a top-level global variable.

A variable definition corresponding to either a field in class or module, or to a top-level global variable.