DerivedFromParamTree

A type tree that computes its type from an existing parameter.

class Tree[Untyped]
trait Showable
trait Container
trait Cloneable
trait Product
trait Equals
trait SrcPos
class Object
trait Matchable
class Any

Type members

Inherited types

type ThisTree[-T >: Untyped] = TypeTree[T]
Inherited from
TypeTree

Value members

Concrete methods

def derivedTree(sym: Symbol)(using Context): TypeTree

Return info of original symbol, where all references to siblings of the original symbol (i.e. sibling and original symbol have the same owner) are rewired to same-named parameters or accessors in the scope enclosing the current scope. The current scope is the scope owned by the defined symbol itself, that's why we have to look one scope further out. If the resulting type is an alias type, dealias it. This is necessary because the accessor of a type parameter is a private type alias that cannot be accessed from subclasses.

Return info of original symbol, where all references to siblings of the original symbol (i.e. sibling and original symbol have the same owner) are rewired to same-named parameters or accessors in the scope enclosing the current scope. The current scope is the scope owned by the defined symbol itself, that's why we have to look one scope further out. If the resulting type is an alias type, dealias it. This is necessary because the accessor of a type parameter is a private type alias that cannot be accessed from subclasses.

override def ensureCompletions(using Context): Unit

Complete the appropriate constructors so that OriginalSymbol attachments are pushed to DerivedTypeTrees.

Complete the appropriate constructors so that OriginalSymbol attachments are pushed to DerivedTypeTrees.

Definition Classes

Inherited methods

final def allAttachments: List[(Key[_], Any)]

The list of all keys and values attached to this container.

The list of all keys and values attached to this container.

Inherited from
LinkSource
final def attachment[V](key: Key[V]): V

The attachment corresponding to key.

The attachment corresponding to key.

Throws
NoSuchElementException

if no attachment with key exists

Inherited from
LinkSource
final def attachmentOrElse[V](key: Key[V], default: V): V

The attachment corresponding to key, or default if no attachment with key exists.

The attachment corresponding to key, or default if no attachment with key exists.

Inherited from
LinkSource
def checkPos(nonOverlapping: Boolean)(using Context): Unit

Check that all positioned items in this tree satisfy the following conditions:

Check that all positioned items in this tree satisfy the following conditions:

  • Parent spans contain child spans
  • If item is a non-empty tree, it has a position
Inherited from
Positioned

Clone this node but assign it a fresh id which marks it as a node in file.

Clone this node but assign it a fresh id which marks it as a node in file.

Inherited from
Positioned
Inherited from
Positioned
override def denot(using Context): Denotation
Definition Classes
Inherited from
DenotingTree
def endPos(using ctx: Context): SourcePosition
Inherited from
SrcPos
def envelope(src: SourceFile, startSpan: Span): Span

The union of startSpan and the spans of all positioned children that have the same source as this node, except that Inlined nodes only consider their call child.

The union of startSpan and the spans of all positioned children that have the same source as this node, except that Inlined nodes only consider their call child.

Side effect: Any descendants without spans have but with the same source as this node have their span set to the end position of the envelope of all children to the left, or, if that one does not exist, to the start position of the envelope of all children to the right.

Inherited from
Positioned
override def equals(that: Any): Boolean
Definition Classes
Tree -> Equals -> Any
Inherited from
Tree
def fallbackToText(printer: Printer): Text

A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

Inherited from
Showable
def focus(using ctx: Context): SourcePosition
Inherited from
SrcPos

If this is a thicket, perform op on each of its trees otherwise, perform op ion tree itself.

If this is a thicket, perform op on each of its trees otherwise, perform op ion tree itself.

Inherited from
Tree
final def getAttachment[V](key: Key[V]): Option[V]

Optionally get attachment corresponding to key

Optionally get attachment corresponding to key

Inherited from
LinkSource
final def hasAttachment[V](key: Key[V]): Boolean

Does an attachment corresponding to key exist?

Does an attachment corresponding to key exist?

Inherited from
LinkSource
final def hasType: Boolean

Does the tree have its type field set? Note: this operation is not referentially transparent, because it can observe the withType modifications. Should be used only in special circumstances (we need it for printing trees with optional type info).

Does the tree have its type field set? Note: this operation is not referentially transparent, because it can observe the withType modifications. Should be used only in special circumstances (we need it for printing trees with optional type info).

Inherited from
Tree
override def hashCode(): Int
Definition Classes
Tree -> Any
Inherited from
Tree

Does this tree define a new symbol that is not defined elsewhere?

Does this tree define a new symbol that is not defined elsewhere?

Inherited from
Tree
override def isEmpty: Boolean
Definition Classes
Inherited from
TypeTree

Is this a legal part of a pattern which is not at the same time a term?

Is this a legal part of a pattern which is not at the same time a term?

Inherited from
Tree

Does this tree represent a term?

Does this tree represent a term?

Inherited from
Tree
override def isType: Boolean
Definition Classes
Inherited from
TypTree
def line(using ctx: Context): Int
Inherited from
SrcPos
inline def orElse[U >: Untyped <: Untyped](inline that: Tree[U]): Tree[U]

if this tree is the empty tree, the alternative, else this tree

if this tree is the empty tree, the alternative, else this tree

Inherited from
Tree
Inherited from
Product
final def pushAttachment[V](key: Key[V], value: V)(using ctx: Context): Unit
Inherited from
Container
final def putAttachment[V](key: Key[V], value: V): Option[V]

Add attachment with given key and value.

Add attachment with given key and value.

Returns

Optionally, the old attachment with given key if one existed before. The new attachment is added at the position of the old one, or at the end if no attachment with same key existed.

Inherited from
LinkSource
Inherited from
Container
final def removeAttachment[V](key: Key[V]): Option[V]

Remove attachment with given key, if it exists.

Remove attachment with given key, if it exists.

Returns

Optionally, the removed attachment with given key if one existed before.

Inherited from
LinkSource
def sameTree(that: Tree[_]): Boolean
Inherited from
Tree
def show(using Context): String

The string representation of this showable element.

The string representation of this showable element.

Inherited from
Showable
def showIndented(margin: Int)(using Context): String

The string representation with each line after the first one indented by the given given margin (in spaces).

The string representation with each line after the first one indented by the given given margin (in spaces).

Inherited from
Showable
def showSummary(depth: Int)(using Context): String

The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

Inherited from
Showable
Inherited from
Positioned
def span: Span

The span part of the item's position

The span part of the item's position

Inherited from
Positioned
def span_=(span: Span): Unit
Inherited from
Positioned
final def srcPos: SrcPos

This positioned item, widened to SrcPos. Used to make clear we only need the position, typically for error reporting.

This positioned item, widened to SrcPos. Used to make clear we only need the position, typically for error reporting.

Inherited from
Positioned
def startPos(using ctx: Context): SourcePosition
Inherited from
SrcPos
final def symbol(using Context): Symbol

Shorthand for denot.symbol.

Shorthand for denot.symbol.

Inherited from
Tree

Convert tree to a list. Gives a singleton list, except for thickets which return their element trees.

Convert tree to a list. Gives a singleton list, except for thickets which return their element trees.

Inherited from
Tree
override def toString: String
Definition Classes
TypeTree -> Any
Inherited from
TypeTree
override def toText(printer: Printer): Text
Definition Classes
Inherited from
Tree
final def tpe: Untyped

The type of the tree. In case of an untyped tree, an UnAssignedTypeException is thrown. (Overridden by empty trees)

The type of the tree. In case of an untyped tree, an UnAssignedTypeException is thrown. (Overridden by empty trees)

Inherited from
Tree

The number of nodes in this tree

The number of nodes in this tree

Inherited from
Tree
final def typeOpt: Type
Inherited from
Tree

A unique identifier in case -Yshow-tree-ids, or -Ydebug-tree-with-id is set, -1 otherwise.

A unique identifier in case -Yshow-tree-ids, or -Ydebug-tree-with-id is set, -1 otherwise.

Inherited from
Positioned

The watched tree; used only for printing

The watched tree; used only for printing

Inherited from
DerivedTypeTree

Install the derived type tree as a dependency on sym

Install the derived type tree as a dependency on sym

Inherited from
DerivedTypeTree

Install the derived type tree as a dependency on original

Install the derived type tree as a dependency on original

Inherited from
DerivedTypeTree
def withAttachment[V](key: Key[V], value: V): DerivedFromParamTree
Inherited from
Container

Copy the sticky attachments from container to this container.

Copy the sticky attachments from container to this container.

Inherited from
Container

A positioned item like this one with given span. If the positioned item is source-derived, a clone is returned. If the positioned item is synthetic, the position is updated destructively and the item itself is returned.

A positioned item like this one with given span. If the positioned item is source-derived, a clone is returned. If the positioned item is synthetic, the position is updated destructively and the item itself is returned.

Inherited from
Positioned
def withType(tpe: Type)(using Context): TypeTree[Type]

Return a typed tree that's isomorphic to this tree, but has given type. (Overridden by empty trees)

Return a typed tree that's isomorphic to this tree, but has given type. (Overridden by empty trees)

Inherited from
Tree
Inherited from
Tree

Inherited fields

protected var myTpe: Untyped
Inherited from
Tree
Inherited from
Positioned