File tree 4 files changed +12
-12
lines changed
src-bootstrapped/scala/compiletime
4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ object int:
9
9
* case 0 => 1
10
10
* case 1 => 2
11
11
* case 2 => 3
12
- * ...
12
+ * // ...
13
13
* case 2147483646 => 2147483647
14
14
* }
15
15
* ```
@@ -152,8 +152,8 @@ object int:
152
152
153
153
/** Negation of an `Int` singleton type.
154
154
* ```scala
155
- * val neg1: Neg [-1] = 1
156
- * val neg2: Neg [1] = -1
155
+ * val neg1: Negate [-1] = 1
156
+ * val neg2: Negate [1] = -1
157
157
* ```
158
158
* @syntax markdown
159
159
*/
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import annotation.compileTimeOnly
6
6
/** Use this method when you have a type, do not have a value for it but want to
7
7
* pattern match on it. For example, given a type `Tup <: Tuple`, one can
8
8
* pattern-match on it as follows:
9
- * ```scala
9
+ * ```scala sc:nocompile
10
10
* inline erasedValue[Tup] match {
11
11
* case _: EmptyTuple => ...
12
12
* case _: h *: t => ...
@@ -32,7 +32,7 @@ def uninitialized: Nothing = ???
32
32
/** The error method is used to produce user-defined compile errors during inline expansion.
33
33
* If an inline expansion results in a call error(msgStr) the compiler produces an error message containing the given msgStr.
34
34
*
35
- * ```scala
35
+ * ```scala sc:nocompile
36
36
* error("My error message")
37
37
* ```
38
38
* or
@@ -70,7 +70,7 @@ transparent inline def codeOf(arg: Any): String =
70
70
* inlining and constant folding.
71
71
*
72
72
* Usage:
73
- * ```scala
73
+ * ```scala sc:nocompile
74
74
* inline def twice(inline n: Int): Int =
75
75
* requireConst(n) // compile-time assertion that the parameter `n` is a constant
76
76
* n + n
@@ -114,7 +114,7 @@ end constValueTuple
114
114
115
115
/** Summons first given matching one of the listed cases. E.g. in
116
116
*
117
- * ```scala
117
+ * ```scala sc:nocompile
118
118
* given B { ... }
119
119
*
120
120
* summonFrom {
Original file line number Diff line number Diff line change @@ -427,11 +427,11 @@ object IArray:
427
427
/** Build an array from the iterable collection.
428
428
*
429
429
* {{{
430
- * scala> val a = IArray.from(Seq(1, 5))
431
- * val a: IArray[Int] = IArray(1, 5)
430
+ * val a = IArray.from(Seq(1, 5))
431
+ * // val a: IArray[Int] = IArray(1, 5)
432
432
*
433
- * scala> val b = IArray.from(Range(1, 5))
434
- * val b: IArray[Int] = IArray(1, 2, 3, 4)
433
+ * val b = IArray.from(Range(1, 5))
434
+ * // val b: IArray[Int] = IArray(1, 2, 3, 4)
435
435
* }}}
436
436
*
437
437
* @param it the iterable collection
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ object Tuple {
127
127
128
128
/** Filters out those members of the tuple for which the predicate `P` returns `false`.
129
129
* A predicate `P[X]` is a type that can be either `true` or `false`. For example:
130
- * ```scala
130
+ * ```scala sc:nocompile
131
131
* type IsString[x] = x match {
132
132
* case String => true
133
133
* case _ => false
You can’t perform that action at this time.
0 commit comments