LinkTimeIf

dotty.tools.sjs.ir.Trees.LinkTimeIf
sealed case class LinkTimeIf(cond: Tree, thenp: Tree, elsep: Tree)(tpe: Type)(implicit pos: Position) extends Tree

Link-time if expression.

The cond must be a well-typed link-time tree of type boolean.

A link-time tree is a Tree matching the following sub-grammar:

link-time-tree ::=
    BooleanLiteral
  | IntLiteral
  | StringLiteral
  | LinkTimeProperty
  | UnaryOp(link-time-unary-op, link-time-tree)
  | BinaryOp(link-time-binary-op, link-time-tree, link-time-tree)
  | LinkTimeIf(link-time-tree, link-time-tree, link-time-tree)

link-time-unary-op ::=
    Boolean_!

link-time-binary-op ::=
    Boolean_== | Boolean_!= | Boolean_| | Boolean_&
  | Int_== | Int_!= | Int_< | Int_<= | Int_> | Int_>=

Note: nested LinkTimeIf nodes in the cond are used to encode short-circuiting boolean && and ||, just like we do with regular If nodes.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Tree
class IRNode
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
def show: String

Attributes

Inherited from:
IRNode

Concrete fields

val tpe: Type

Implicits

Implicits

implicit val pos: Position