Highlights of the release
- Support for JDK 24 #22250
- REPL
:silent
command to toggle automatic printing of outputs #22248 - REPL
--repl-init-script:
setting to run a code on startup #22206 - Deprecated setting
-Xno-decode-stacktraces
is now an alias to-Xno-enrich-error-messages
#22208 - Annotation arguments are no longer lifted #22035
- Experimental Capture Checking: Implement tracked members #21761
Breaking changes
-
Align
@implicitNotFound
and@implicitAmbigous
with the language specification #22371This change may impact users who previously used these annotations using variables or string interpolation.
Previously, a bug in the Scala 3 compiler allowed non-literal strings to be passed as arguments to the
@implicitNotFound
and@implicitAmbiguous
annotations.
This could have affected how failed implicit search results were reported by the compiler.Starting from Scala 3.6.4, the arguments for these annotations must be string literals.
If a message is too long, it can be concatenated using the+
operator, allowing for constant folding.
Other changes and fixes
Annotations
- Make sure symbols in annotation trees are fresh before pickling #22002
- Consider all arguments in Annotations.refersToParamOf #22001
- Do not lift annotation arguments (bis) #22046
Desugaring
Documentation
- Update example code linked to obsolete content in macros-spec.md #22256
Experimental: Capture Checking
- Fix #21868, #21869, and #21870: handle CapsOf in more places #21875
- Refine rules for capture parameters and members #22000
- Add a hint for using CC with REPL #22220
- Consolidate CC #21863
Experimental: Global Initialization
- Fix crash when initializing val in ByName closure #22354
Experimental: Named Tuples
- Handle TypeProxy of Named Tuples in unapply #22325
- Fail more eagerly when trying to adapt named unapply patterns #22315
- Widen singleton types when computing fields from .Fields #22149
- Fix .toTuple insertion #22028
Extension Methods
Implicits
- Rollback constraints in compareAppliedTypeParamRef #22339
- Try implicit searching after finding dynamic select #22318
Linting
- Allow discarding "Discarded non-Unit" warnings with
: Unit
#21927
Match Types
- Fix #21841: Check more that an
unapplySeq
on aNonEmptyTuple
is valid. #22366 - Type avoidance in MT bound inference #22142
Metaprogramming
- Rethrow SuspendExceptions caught in CodeGen phase #22009
Metaprogramming: Compile-time
- Extend compiletime.testing.typechecks with certain transform phases #21185
Nullability
Presentation Compiler
- Use new infer expected type for singleton complations #21421
- Fix match error in keyword completions #22138
Reflection
- Do not return java outline dummy constructor in
primaryConstructor
#22104
Reporting
- Normalise the types for Type Mismatch Error (E007) #22337
- Improve given search preference warning #22189
- Better error messages when an enum derives from AnyVal #22236
- Correctly print litteral types in the refined printer #22351
Rewrites
- Undo patch of double-block apply #21982
Scaladoc
- Scaladoc: Add support for named tuples #22263
Settings
- Limit exposure to ConcurrentModificationException when sys props are replaced or mutated #22180
Specification
Transform
Typer
Contributors
Thank you to all the contributors who made this release possible 🎉
According to git shortlog -sn --no-merges 3.6.3..3.6.4
these are:
46 Martin Odersky
33 noti0na1
24 Wojciech Mazur
14 Dale Wijnand
13 Matt Bovel
11 Hamza Remmal
7 Jan Chyb
6 aherlihy
5 Kacper Korban
5 Seth Tisue
5 Som Snytt
4 Oliver Bračevac
4 Yichen Xu
3 Sébastien Doeraene
3 dependabot[bot]
3 kasiaMarek
2 João Ferreira
1 David Hua
1 Eugene Flesselle
1 Eugene Yokota
1 Florian3k
1 Jędrzej Rochala
1 Kenji Yoshida
1 Mathias
1 Natsu Kagami
1 Oleg Zenzin
1 Piotr Chabelski
1 Rui Chen
1 philippus
1 rochala
1 xiaoshihou