Skip to content

Commit

Permalink
Add doc comments to the new mode InQuotePatternHoasArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
zeptometer committed Jun 30, 2023
1 parent f9098a8 commit e8ac1e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compiler/src/dotty/tools/dotc/core/Mode.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ object Mode {
/** Are we looking for cyclic references? */
val CheckCyclic: Mode = newMode(5, "CheckCyclic")

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

/** We are in a pattern alternative */
Expand Down

0 comments on commit e8ac1e9

Please sign in to comment.