QuotesAndSplices

Type quotes '{ ... } and splices ${ ... }

class Object
trait Matchable
class Any
class Typer
class ReTyper
class Typer
class Checker

Value members

Concrete methods

def typedAppliedSplice(tree: Apply, pt: Type)(using Context): Tree

Types a splice applied to some arguments $f(arg1, ..., argn) in a quote pattern.

Types a splice applied to some arguments $f(arg1, ..., argn) in a quote pattern.

The tree is desugared into $f.apply(arg1, ..., argn) where the expression $f is expected to type as a function type (T1, ..., Tn) => R. Ti is the type of the argument argi and R if the type of the prototype. The prototype must be fully defined to be able to infer the type of R.

def typedQuote(tree: Quote, pt: Type)(using Context): Tree

Translate '{ e } into scala.quoted.Expr.apply(e) and '[T] into scala.quoted.Type.apply[T] while tracking the quotation level in the context.

Translate '{ e } into scala.quoted.Expr.apply(e) and '[T] into scala.quoted.Type.apply[T] while tracking the quotation level in the context.

def typedQuotedTypeVar(tree: Ident, pt: Type)(using Context): Tree

Type a pattern variable name t in quote pattern as ${given t$giveni: Type[t @ _]}. The resulting pattern is the split in splitQuotePattern.

Type a pattern variable name t in quote pattern as ${given t$giveni: Type[t @ _]}. The resulting pattern is the split in splitQuotePattern.

def typedSplice(tree: Splice, pt: Type)(using Context): Tree

Translate ${ t: Expr[T] } into expression t.splice while tracking the quotation level in the context

Translate ${ t: Expr[T] } into expression t.splice while tracking the quotation level in the context

def typedTypSplice(tree: TypSplice, pt: Type)(using Context): Tree

Translate ${ t: Type[T] }into typet.splice` while tracking the quotation level in the context

Translate ${ t: Type[T] }into typet.splice` while tracking the quotation level in the context