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 {
17
17
*/
18
18
inline def error (inline msg : String ): Nothing = ???
19
19
20
- /** Returns the string representations for code passed in the interpolated values
20
+ /** Returns the string representation of interpolated values:
21
+ *
21
22
* ```scala
22
23
* inline def logged(p1: => Any) = {
23
24
* val c = code"code: $p1"
24
25
* val res = p1
25
26
* (c, p1)
26
27
* }
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"))
32
31
* ```
32
+ *
33
+ * @note only by-name arguments will be displayed as "code".
34
+ * Other values may display unintutively.
33
35
*/
34
36
inline def (self : => StringContext ) code (args : => Any * ): String = ???
35
37
You can’t perform that action at this time.
0 commit comments