class ReTyper[+C <: Context] extends AnyRef
heavy wizardry to fight the dark forces of Scala type-checking in macros
- Alphabetic
- By Inheritance
- ReTyper
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ReTyper(c: C)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val c: C
-
def
cleanModifiers(mods: scala.reflect.macros.Universe.Modifiers, removeFlags: scala.reflect.macros.Universe.FlagSet = NoFlags): scala.reflect.macros.Universe.Modifiers
Cleans the flag set of the given modifiers.
Cleans the flag set of the given modifiers.
The type-checking process annotates definitions with various flags. Some of them can also be inserted by user-code or even have a corresponding Scala language construct, but others are only used by the type-checker. Certain flags can interfere with type-checking and cause it to fail. Those flags can be safely removed and will be re-inserted during type-checking when needed.
This method eliminates some problematic cases.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- def createTypeTree(tpe: scala.reflect.macros.Universe.Type, pos: scala.reflect.macros.Universe.Position, owners: Set[scala.reflect.macros.Universe.Symbol]): scala.reflect.macros.Universe.Tree
-
def
createTypeTree(tpe: scala.reflect.macros.Universe.Type, pos: scala.reflect.macros.Universe.Position): scala.reflect.macros.Universe.Tree
Creates an AST representing the given type.
Creates an AST representing the given type.
The type-checking process creates synthetic type trees and it is possible to insert trees with type information, but it is not easily possible to create an AST for a given type.
This method attempts to create such an AST, which is persistent across type-checking and un-type-checking.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
retypecheck(tree: scala.reflect.macros.Universe.Tree): scala.reflect.macros.Universe.Tree
Re-type-checks the given tree, i.e., first un-type-checks it and then type-checks it again using untypecheck and typecheck, respectively.
-
def
retypecheckAll(tree: scala.reflect.macros.Universe.Tree): scala.reflect.macros.Universe.Tree
Re-type-checks the given tree resetting all symbols using the
org.scalamacros.resetallattrs
library, i.e., first un-type-checks it and then type-checks it again using untypecheckAll and typecheck, respectively. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
typecheck(tree: scala.reflect.macros.Universe.Tree): scala.reflect.macros.Universe.Tree
Type-checks the given tree.
Type-checks the given tree. If type-checking fails, aborts the macro expansion issuing the type-checking error.
The type-checking process distorts certain ASTs (such as representations of extractors, lazy values or case classes) in a way that they cannot be type-checked again. The issue is described in SI-5464.
-
def
untypecheck(tree: scala.reflect.macros.Universe.Tree): scala.reflect.macros.Universe.Tree
Un-type-checks the given tree.
Un-type-checks the given tree.
The type-checking process distorts certain ASTs (such as representations of extractors, lazy values or case classes) in a way that they cannot be type-checked again. The issue is described in SI-5464.
This method tries to restore the AST to a form, which can be type-checked again.
-
def
untypecheckAll(tree: scala.reflect.macros.Universe.Tree): scala.reflect.macros.Universe.Tree
Un-type-checks the given tree resetting all symbols using the
org.scalamacros.resetallattrs
library.Un-type-checks the given tree resetting all symbols using the
org.scalamacros.resetallattrs
library.The type-checking process distorts certain ASTs (such as representations of extractors, lazy values or case classes) in a way that they cannot be type-checked again. The issue is described in SI-5464.
This method tries to restore the AST to a form, which can be type-checked again.
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated