3.2.0
Highlights of the release
- Add runtime.TupleMirror to avoid anonymous classes for mirrors of tuples #15404
- Fix TupleXXL.productPrefix #15411
- Synthesize mirrors for small generic tuples #15250
- Fix #14150: Constrain refinements to type parameters #15014
- Gradual warning for deprecated nonlocal return #15303
- Restrict mirrors of any union type #15279
- Stabilize 3.2 APIs #15197
- Add error reporting for mirror synthesis #15164
- Fix #14432: Check if scala 2 case class is accessible #15008
- Fix #12919: Summon anonymous mirror when companion is a case object #14986
- Erase
Int | Nothingsignatures types intoInt#14971 - Allow exports in extension clauses #14497
- Fix Scala Wart about implicit () class parameters #14840
- Re-architecture quote pickling #12540
- Add
scala.annotation.MainAnnotation#14558 - Add in initial support for code coverage #13880
- Support tuple specialisation #15060
- Remove support for
-scala-output-versionflag #15146 - Make lazy vals and object native image friendly #14780
- Allow return in tailrec position #14067
Other changes and fixes
Backend
- Keep annotation order #15063
- Update asm to 9.3 #14926
- Fix #14773: Reuse the param slots for the tailrec local mutable vars. #14865
- Better error messages in case of
TooLarge*exceptions in GenBCode #14943
Coverage
- Fix relativizing paths in coverage serializer #15240
- Fix lifting of arguments with
-coverage-out#15530 - Avoid instrumentation of inline and erased definitions #15504
- Keep
funandargstogether when instrumentingTypeApplyfor coverage #15739
Erasure
- Handle
&and|types when computing tuple arity #15330 - Fix two problems related to match types as array elements #15625
Experimentals
- Fix check experimental inline references #15147
Exports
- Refine criterion when to skip identifiers in pattern constructors #15367
- Simplify and harden duplicates checking in exports #14879
- Fix
isAbsTypeprediction inTreeUnpickler#14861
F-bounds
- Recursion brake for joins in TypeComparer #14880
GADTs
- Heal pattern-bound type by gathering constraints #15095
- Consider GADT upper bounds when upcasting the scrutinee type #15351
- Extract wildcard GADT constraints more directly #14832
- Fix constraining against
HKTypeLambdaarguments #15688
IDE Support
- Docs: Add a comment to
pathTomentioning that it might returnerrorTermTree#15420 - Fix completions to properly contain public fields if they were shadowed #15236
- Add proper signatureHelp for unapply methods #15203
- Fix signatureHelp to show enclosing apply instead of closest one. #15119
- Fix implicit conversion type resolve in completions #15061
- Fix type alias completion, unify completion tests style #15047
- Support code completion for refined types #15283
- Fix
SourceFile.columnmethod. #15209
Initialization
- Check method arguments with parametricity when static #14916
- Add safe-init test to prevent adding cold elements to hot arrays #14895
- Allow non-hot values in SeqLiterals #14794
Inline
- Make private inline accessors
final#15324 - Fix inlining when outer select is needed from inline call prefix #15327
- Support inline methods calling private inline methods on
this#15075 - Types with only an abstract inline method are not SAMs #14874
- Don't issue unreachable error messages for inlined code #14871
- Dealias arg type to detect opaque types #15074
- Fix dependency status calculation for refined type aliases in method result types #15390
- Fix computation of class nesting level in inliner #15671
- Always expand inline accessor names #15619
Java Compatibility
- Java generic signatures can't refer to type members #15093
- Simplify and correctify calculation of the InnerClass attribute #15153
- Fix #13523: Survive missing Java inner annotation classfiles #15094
Match Types
- Implement
provablyDisjointfor refined types and type aliases #15375 - Cache skolem types #14909
- Refine Matchtype checking #15423
Nullability
- Speed up
.nn#15418 - Fix handling imports in
TreeUnpickler#15137 - Honor language imports when unpickling #14962
- Remove special
eq/nein unsafeNulls #15186 - Add
eq/neextension forAnyRef|Nullto Scala3RunTime #14632
Parser
- Fix parser error for type arguments with trailing comma #15395
- Change fewerbraces to always use a colon, even before lambdas #15273
- Deprecate 3.1-migration, err on import #14978
- Treat all incomplete ifs as statements #14960
- Clarify and test rules for newline suppression #14877
- Tweak assertion in withMods #14857
- Fix loop in parser #15421
- Parse unary operators as regular identifiers when backquoted #15198
- Harden erasure of TermRefs #15658
Pattern Matching
- Preserve modifiers when desugaring for-comps #15403
- Extract unapply types like typedUnApply #15254
- Force Java enum children to be queried #15109
- Enable stricter pattern binding warnings by default #14294
- Irrefutable for generators don't require
withFilterunder-source:future#15593 - Refutable extractor may be an
Applytree #15651
Pickling
- Survive unpickling crashes when completing from Tasty #14884
Quotes
- Transform RHS of captured assignment reference #15247
- Properly look for inline methods #15072
- Fix hash code of ExprImpl and TypeImpl #15281
- Compute correct argument type in ExprMap #15269
- Detect quoted pattern variables in alternatives #15073
- Disallow old uses of quoted and spliced types #15012
- Fix capturing conditions of HOAS quote patterns #14822
Reflection
- Add missing cases in SourceCode printer #15032
- Add reflect
AppliedTypeconstructor #14923 - Add regression test #14924
Reporting
- Case class must have at least one leading non-implicit parameter list #15382
- Improve opaque type with no RHS error message #15285
- Refine condition when to report errors in an inserted apply #15016
- Accept soft modifiers separated by blank lines #14959
- Fix warning with leaking
thisinto Scala2 synthetic apply #15307 - Refine error messages for early promotion #15263
- Standardize
-rewriteadvertisements and suppress them in REPL #14955 - Improve diagnostic for refutable extractors in pattern bindings #14988
- Fix: correction to ClassTooLargeException message #14974
Scaladoc
- Fix rendering
ThisType#15440 - Add extension suffixes and fqName to scaladoc searchbar #15048
- Fix implicit members resolution #15021
- Fix windows paths handling in legacy external link provider #15023
- Warn about special characters in filenames according to the default Jekyll rules #14657
- Scaladoc annotations rework #15361
- Fix expanding docstrings in Scaladoc #15045
Scripting
SemanticDB
- Do not register SymbolOccurrence for non-symbol endmarker #15143
Standard Library
- Implement new main annotation #14841
- Add compiletime.ops.string.CharAt #14431
- Make
EmptyTupleacase object#14972 - Deprecate
ToStringtype which should be deprecated at 3.2.0 #15645
Tasty Inspector
Tooling
- Add -Vprofile option #15406
- Fix rewrite for type-ascribed refutable pattern binding #15314
- Fix rewrites for refutable pattern bindings #14954
Transform
- Also hoist lifted arguments in super calls #14919
- Add deprecated overriding checks #15432
- Don't cast to a value class as self type #14885
- Disallow
@targetNameon top-levelclass,trait, andobject#15068 - Handle case where abstract overrides miss an implementation #14893
- Treat RecTypes as potentially uncheckable #14894
- Allow multiple wildcard vals #14906
- Handle non-specialized functions in EtaReduce #15498
Typeclass Derivation
- Support intersection types in mirrorCompanionRef #15192
- Fix #15222: Recursively check for product ctor accessibility #15231
- Fix 14025: Restrict curried type lambdas in mirror generation #15006
- Make anonymous mirrors serializable #15391
- Support Mirror synthesis for local and inner classes #15847
Typer
- Fix #15405: Dealias Or type constituents when finding its dominator #15416
- Handle unconstrained TypeVars when synthesizing ClassTags #15376
- Allow for unqualified
applyas context functions #15417 - Prevent crash when reporting an error #15320
- Show a match type trace for "not a class type" errors #15218
- Don't constrain type variables in normalize #15223
- Eta expand CFTs in super accessors if needed #15092
- Reject structural applications of polymorphic methods #15090
- Hande clashes between same-named exports #14967
- Fix outer reference detection in class parents #14961
- Avoid redundant type test for irrefutable @unchecked patterns #14898
- Detect clashes involving renamed exports #14831
- Guard against stackoverflows when instantiating HK-Lambdas #14851
- Don't try conversions or extensions on Java companion objects #14881
- Revert #14452 and make compile-time operations on stable arguments stable #15268
- Better handling of type parameters in constructor pattern #15356
- Handle AvoidMap recursions #15393
- Add missing condition in checking synthetic apply #15362
- Harden type assignment of lambda trees #14887
- Disallow package names as types #14888
- Fix
constToLiteral#14853 - Survive TypeErrors in
isMatchedBy#15675 - Don't ignore expected types of
New#15679 - Better infos for dependent class parameter references #15667
Contributors
Thank you to all the contributors who made this release possible 🎉
According to git shortlog -sn --no-merges 3.1.3..3.2.0 these are:
154 odersky
62 Nicolas Stucki
51 Filip Zybała
42 Jamie Thompson
39 Dale Wijnand
30 Tom Grigg
29 Paweł Marks
29 rochala
25 Guillaume Raffin
13 Fengyun Liu
13 Ondrej Lhotak
11 Guillaume Martres
11 Sébastien Doeraene
7 Matt Bovel
7 Som Snytt
6 Szymon Rodziewicz
5 Julien Richard-Foy
5 Martin Odersky
5 Wojciech Mazur
4 Chris Kipp
4 Olivier Blanvillain
4 Xavientois
3 Rikito Taniguchi
3 Vadim Chelyshov
2 Adrien Piquerez
2 Albert Chen
2 Anatolii Kmetiuk
2 Arnout Engelen
2 Jan Chyb
2 Lan, Jian
2 Phil
2 Philippus
2 Raphael Jolly
2 Robert Stoll
2 Tim Spence
2 cgccuser
2 gagandeepkalra
2 manojo
2 noti0na1
2 Артём
1 Aleksander Boruch-Gruszecki
1 Dmitrii Naumenko
1 Humberto Rodríguez A
1 Johannes Rudolph
1 Jędrzej Rochala
1 Krzysztof Romanowski
1 Magnolia.K
1 Michał Pałka
1 Ondřej Lhoták
1 Stéphane Micheloud
1 Timothée Loyck Andres
1 Yichen Xu
1 adampauls
1 johannes karoff
1 ouertani
1 xuwei-k
1 yoshinorin