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.
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.
Corrects the symbols for the given tree that has a macro annotation which invoked the type-checker on the tree.
Corrects the symbols for the given tree that has a macro annotation which invoked the type-checker on the tree.
Type-checking ASTs that represent Scala objects in a macro annotation may lead to recursive expansion of the same tree (which the macro annotation needs to handle). The symbols that the type-checker associates to the tree can then originate from different expansions.
This method tries to correct the symbols in the tree, such that the same entities are associated to the same symbol.
Re-type-checks the given tree, i.e., first un-type-checks it and then type-checks it again using untypecheck and typecheck, respectively.
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.
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.
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.
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.
(Since version ) see corresponding Javadoc for more information.
heavy wizardry to fight the dark forces of Scala type-checking in macros