You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/reference/metaprogramming/inline.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -230,9 +230,9 @@ Example:
230
230
```scala
231
231
inlinedefupdate(delta: Int) =
232
232
inlineif (delta >=0) increaseBy(delta)
233
-
elsedecreaseByf(delta)
233
+
elsedecreaseBy(-delta)
234
234
```
235
-
A call `update(22)` would rewrite to `increaseBy(22`. But if `update` was called with
235
+
A call `update(22)` would rewrite to `increaseBy(22)`. But if `update` was called with
236
236
a value that was not a compile-time constant, we would get a compile time error like the one
237
237
below:
238
238
```
@@ -289,7 +289,7 @@ val intTwo: 2 = natTwo
289
289
290
290
`natTwo` is inferred to have the singleton type 2.
291
291
292
-
## The scala.compiletime Package
292
+
## The `scala.compiletime` Package
293
293
294
294
The `scala.compiletime` package contains helper definitions that provide support for compile time operations over values. They are described in the following.
295
295
@@ -473,4 +473,4 @@ inline def f: Any = implicit match {
473
473
474
474
For more info, see [PR #4927](https://github.com/lampepfl/dotty/pull/4768),
475
475
which explains how inline methods can be used for typelevel programming and code
0 commit comments