Skip to content

Commit 9804d64

Browse files
committed
Final tweaks to docs
1 parent ce7ee0f commit 9804d64

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/_docs/reference/experimental/erased-defs-spec.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ nightlyOf: https://docs.scala-lang.org/scala3/reference/experimental/erased-defs
1010
* `erased` cannot appear in a `lazy` `val` definition.
1111
* `erased` _can_ appear for a parameterless given that expands to a value
1212
definition. In that case the `given` is expanded to a non-lazy `val`.
13+
* `erased` cannot appear in a call-by-name parameter.
1314
* `erased` cannot appear in a mutable `var` definition.
1415
* `erased` cannot appear in an `object` definition.
1516

16-
2. Values that have a type that extends the `scala.compiletime.Erased` trait are
17+
2. Values or parameters that have a type that extends the `scala.compiletime.Erased` trait are
1718
implicitly `erased`.
1819

1920
* The restrictions of point (1) apply.

docs/_docs/reference/experimental/erased-defs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ using clause `(using CanSerialize[T])` which gets implicitly tagged with `erased
161161

162162
- The `CanEqual` evidence of [multiversal equality](../contextual/multiversal-equality.html) checks that two types can be compared. The actual comparison is done by the universal `equals` method of class `Object` or an overriding instance, it does not rely on the `CanEqual` value.
163163
So far, `CanEqual` is handled specially in the compiler. With erased definitions, we could
164-
avoid some of the special treatment by making `CanThrow` extend `compiletime.Erased`.
164+
avoid some of the special treatment by making `CanEqual` extend `compiletime.Erased`.
165165

166166
- The conforms `<:<` typeclass asserts that we can prove that two types are in a subtype relation. `<:<` does offer a method to upcast values, but that could be also provided as a compiler-generated
167167
cast operation. In that case, run-time instances of `<:<` (and also `=:=`) would be no longer needed and could be erased.

0 commit comments

Comments
 (0)