diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-05-11 12:14:19 -0700 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-05-11 12:14:19 -0700 |
commit | aa7568e8161552952ae16e0a5a79ce3ea517abe3 (patch) | |
tree | 679819f1381ec39b79169c2c21ca5d6acca72b63 /src/reflect | |
parent | 0ae7e55209129dc3d76d56887e88b2c817e6b904 (diff) | |
parent | 4e64a2731d6e4c27e2fd4c75559e118708e79ad5 (diff) | |
download | scala-aa7568e8161552952ae16e0a5a79ce3ea517abe3.tar.gz scala-aa7568e8161552952ae16e0a5a79ce3ea517abe3.tar.bz2 scala-aa7568e8161552952ae16e0a5a79ce3ea517abe3.zip |
Merge pull request #2494 from scalamacros/ticket/5923
makes sense of implicit macros!
Diffstat (limited to 'src/reflect')
-rw-r--r-- | src/reflect/scala/reflect/macros/Enclosures.scala | 6 | ||||
-rw-r--r-- | src/reflect/scala/reflect/macros/Typers.scala | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/reflect/scala/reflect/macros/Enclosures.scala b/src/reflect/scala/reflect/macros/Enclosures.scala index c48656b366..a4ad71c348 100644 --- a/src/reflect/scala/reflect/macros/Enclosures.scala +++ b/src/reflect/scala/reflect/macros/Enclosures.scala @@ -29,8 +29,12 @@ trait Enclosures { */ val enclosingMacros: List[Context] - /** Types along with corresponding trees for which implicit arguments are currently searched. + /** Information about one of the currently considered implicit candidates. + * Candidates are used in plural form, because implicit parameters may themselves have implicit parameters, + * hence implicit searches can recursively trigger other implicit searches. + * * Can be useful to get information about an application with an implicit parameter that is materialized during current macro expansion. + * If we're in an implicit macro being expanded, it's included in this list. * * Unlike `openImplicits`, this is a val, which means that it gets initialized when the context is created * and always stays the same regardless of whatever happens during macro expansion. diff --git a/src/reflect/scala/reflect/macros/Typers.scala b/src/reflect/scala/reflect/macros/Typers.scala index 427e7854b2..d36636a6d2 100644 --- a/src/reflect/scala/reflect/macros/Typers.scala +++ b/src/reflect/scala/reflect/macros/Typers.scala @@ -24,8 +24,12 @@ trait Typers { */ def openMacros: List[Context] - /** Types along with corresponding trees for which implicit arguments are currently searched. + /** Information about one of the currently considered implicit candidates. + * Candidates are used in plural form, because implicit parameters may themselves have implicit parameters, + * hence implicit searches can recursively trigger other implicit searches. + * * Can be useful to get information about an application with an implicit parameter that is materialized during current macro expansion. + * If we're in an implicit macro being expanded, it's included in this list. * * Unlike `enclosingImplicits`, this is a def, which means that it gets recalculated on every invocation, * so it might change depending on what is going on during macro expansion. |