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: blog/_posts/2022-01-17-scala-3.1.1-released.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,15 @@ by: Paweł Marks, VirtusLab
5
5
title: Scala 3.1.1 and forward compatibility news
6
6
---
7
7
8
-
Hello from the Scala 3 team! We are back with a new release of the Scala compiler and exciting news about improvements in forward compatibility.
8
+
Hello from the Scala 3 team! We are back with a new release of the Scala compiler and some exciting news about improvements in forward compatibility.
9
9
10
10
## Improvements is Scala 3.1.1
11
11
12
12
Scala 3.1.1 is the patch release focused on bug fixes. Although there are no new additions to the language, you can still spot some noticeable improvements:
13
13
14
14
- You can use `using` clauses to introduce subtyping relations between types in the function body.
15
15
16
-
Now the code like this should compile. Any value of type `A` can be assigned to a value of type `B`:
16
+
Now, the code like below should compile. Any value of type `A` can be assigned to a value of type `B`:
17
17
18
18
```scala
19
19
defexample[A, B](a: A)(usingA<:<B) =
@@ -40,7 +40,7 @@ We expect that in the future authors will use the newest available version of th
40
40
41
41
So, for example, compiling your library using Scala 3.1.2-RC2 with `-Yscala-release:3.0` flag, you make it possible for people still using Scala 3.0 to depend on your library. This has one limitation, you won't be able to use any symbol added to the standard library after 3.0. They are marked in the code and in the documentation by the `@since` annotation that was also added in this version.
42
42
43
-
One important note is that the `-Yscala-release` flag is experimental and not yet available in any stable release of the compiler. It means the build tools, such as SBT or Mill, are not yet aware of its existence. Of course, you can declare usage of the flag in your build file, and the compiler will respect it. However, there may still be some hiccups, like generated artifacts depending on the incorrect version of the stdlib. We will do our best to help fix those minor issues before the stable release of 3.1.1.
43
+
One important note is that the `-Yscala-release` flag is experimental and not yet available in any stable release of the compiler. It means the build tools, such as SBT or Mill, are not yet aware of its existence. Of course, you can declare usage of the flag in your build file, and the compiler will respect it. However, there may still be some hiccups, like generated artifacts depending on the incorrect version of the stdlib. We will do our best to help fix those minor issues before the stable release of 3.1.2.
44
44
45
45
You can read about potential next steps and leave your feedback in [the discussion](https://contributors.scala-lang.org/t/improving-scala-3-forward-compatibility/5298) that initiaded this change.
0 commit comments