Skip to content

Commit 3d06d94

Browse files
authored
Merge pull request scala#14619 from dotty-staging/fix-#14510
Improve documentation `underlyingArgument`
2 parents 14e806b + 40a666b commit 3d06d94

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

library/src/scala/quoted/Quotes.scala

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,10 +699,20 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
699699
/** TypeRepr of this term */
700700
def tpe: TypeRepr
701701

702-
/** Replace Inlined nodes and InlineProxy references to underlying arguments */
702+
/** Replace Inlined nodes and InlineProxy references to underlying arguments.
703+
* The resulting tree is useful for inspection of the value or content of a non-inline argument.
704+
*
705+
* Warning: This tree may contain references that are out of scope and should not be used in the generated code.
706+
* This method should only used to port Scala 2 that used to access their outer scope unsoundly.
707+
*/
703708
def underlyingArgument: Term
704709

705-
/** Replace Ident nodes references to the underlying tree that defined them */
710+
/** Replace Ident nodes references to the underlying tree that defined them.
711+
* The resulting tree is useful for inspection of the definition of some bindings.
712+
*
713+
* Warning: This tree may contain references that are out of scope and should not be used in the generated code.
714+
* This method should only used to port Scala 2 that used to access their outer scope unsoundly.
715+
*/
706716
def underlying: Term
707717

708718
/** Converts a partially applied term into a lambda expression */

0 commit comments

Comments
 (0)