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/other-new-features/experimental-defs.md
+2
Original file line number
Diff line number
Diff line change
@@ -268,6 +268,8 @@ Experimental definitions can only be referenced in an experimental scope. Experi
268
268
6. Any code compiled using a [_Nightly_](https://search.maven.org/artifact/org.scala-lang/scala3-compiler_3) or _Snapshot_ version of the compiler is considered to be in an experimental scope.
269
269
Can use the `-Yno-experimental` compiler flag to disable it and run as a proper release.
270
270
271
+
7. An experimental language feature is imported in at the package level. All top-level definitions will be marked as `@experimental`.
272
+
271
273
In any other situation, a reference to an experimental definition will cause a compilation error.
Copy file name to clipboardExpand all lines: docs/_spec/TODOreference/other-new-features/experimental-defs.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -216,7 +216,7 @@ Experimental definitions can only be referenced in an experimental scope. Experi
216
216
217
217
<details>
218
218
<summary>Example 1</summary>
219
-
219
+
220
220
```scala
221
221
importscala.annotation.experimental
222
222
@@ -242,7 +242,7 @@ Experimental definitions can only be referenced in an experimental scope. Experi
242
242
}
243
243
}
244
244
```
245
-
245
+
246
246
</details>
247
247
248
248
5. Annotations of an experimental definition are in experimental scopes. Examples:
@@ -268,6 +268,8 @@ Experimental definitions can only be referenced in an experimental scope. Experi
268
268
6. Any code compiled using a [_Nightly_](https://search.maven.org/artifact/org.scala-lang/scala3-compiler_3) or _Snapshot_ version of the compiler is considered to be in an experimental scope.
269
269
Can use the `-Yno-experimental` compiler flag to disable it and run as a proper release.
270
270
271
+
7. An experimental language feature is imported in at the package level. All top-level definitions will be marked as `@experimental`.
272
+
271
273
In any other situation, a reference to an experimental definition will cause a compilation error.
0 commit comments