File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
library/src/scala/compiletime Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -17,19 +17,21 @@ package object compiletime {
1717 */
1818 inline def error (inline msg : String ): Nothing = ???
1919
20- /** Returns the string representations for code passed in the interpolated values
20+ /** Returns the string representation of interpolated values:
21+ *
2122 * ```scala
2223 * inline def logged(p1: => Any) = {
2324 * val c = code"code: $p1"
2425 * val res = p1
2526 * (c, p1)
2627 * }
27- * logged(indentity("foo"))
28- * ```
29- * is equivalent to:
30- * ```scala
31- * ("code: indentity("foo")", indentity("foo"))
28+ * logged(identity("foo"))
29+ * // above is equivalent to:
30+ * // ("code: identity("foo")", identity("foo"))
3231 * ```
32+ *
33+ * @note only by-name arguments will be displayed as "code".
34+ * Other values may display unintutively.
3335 */
3436 inline def (self : => StringContext ) code (args : => Any * ): String = ???
3537
You can’t perform that action at this time.
0 commit comments