Skip to content

Commit eb3346c

Browse files
committed
Add doc comments to the new mode InQuotePatternHoasArgs
1 parent f9098a8 commit eb3346c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compiler/src/dotty/tools/dotc/core/Mode.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ object Mode {
4444
/** Are we looking for cyclic references? */
4545
val CheckCyclic: Mode = newMode(5, "CheckCyclic")
4646

47+
/** We are in arguments of HOAS pattern in quote pattern matching
48+
* e.g. x, y, z in a quote pattern '{ ... $a(x, y, z) ... }
49+
*
50+
* This mode keep typer from inserting contextual parameters to a contextual method without arguments.
51+
* (See tests/run-macros/i17905 for motivating examples)
52+
*/
4753
val InQuotePatternHoasArgs: Mode = newMode(6, "InQuotePatternHoasArgs")
4854

4955
/** We are in a pattern alternative */

0 commit comments

Comments
 (0)