Skip to content

Commit b7956e4

Browse files
committed
Add note about experimental nature to doc page
1 parent becd9d7 commit b7956e4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/docs/reference/changed-features/numeric-literals.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ layout: doc-page
33
title: Numeric Literals
44
---
55

6+
**Note**: This feature is not yet part of the Scala 3 language definition. It can be made available by a language import:
7+
```scala
8+
import scala.language.experimental.genericNumberLiterals
9+
```
10+
611
In Scala 2, numeric literals were confined to the primitive numeric types `Int`, `Long`, `Float`, and `Double`. Scala 3 allows to write numeric literals also for user defined types. Example:
712
```scala
813
val x: Long = -10_000_000_000

0 commit comments

Comments
 (0)