summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/macros/Typers.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/reflect/scala/reflect/macros/Typers.scala')
-rw-r--r--src/reflect/scala/reflect/macros/Typers.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/macros/Typers.scala b/src/reflect/scala/reflect/macros/Typers.scala
index f1d8575774..d0dccb469d 100644
--- a/src/reflect/scala/reflect/macros/Typers.scala
+++ b/src/reflect/scala/reflect/macros/Typers.scala
@@ -27,7 +27,7 @@ trait Typers {
/** Represents mode of operations of the typechecker underlying `c.typecheck` calls.
* Is necessary since the shape of the typechecked tree alone is not enough to guess how it should be typechecked.
- * Can be EXPRmode (typecheck as a term) or TYPEmode (typecheck as a type).
+ * Can be EXPRmode (typecheck as a term), TYPEmode (typecheck as a type) or PATTERNmode (typecheck as a pattern).
*/
// I'd very much like to make use of https://github.com/dsl-paradise/dsl-paradise here!
type TypecheckMode
@@ -41,6 +41,10 @@ trait Typers {
*/
val TYPEmode: TypecheckMode
+ /** Indicates that an argument to `c.typecheck` should be typechecked as a pattern.
+ */
+ val PATTERNmode: TypecheckMode
+
/** @see `scala.reflect.macros.TypecheckException`
*/
type TypecheckException = scala.reflect.macros.TypecheckException