3.3.4
Highlights of the release
- Error when reading class file with unknown newer jdk version #18618
- Add support for xsbti.compile.CompileProgress #18739
- Add support for
@deprecatedInheritance
#19082 - Bump JLine 3.19.0 -> 3.24.1 & sbt 1.9.7 -> 1.9.9 #19744
- Repl - method signatures in autocomplete #19917
- Upgrade Scala 2 to 2.13.14 (was 2.13.12) #20902
Notable changes
- Backport of #20463 corrects generic signatures emitted in the JVM bytecode for value classes and aligns it with Scala 2.13 semantics. The previously generated signatures for value classes were invalid - they contained underlying value class type instead of boxed type. This change would lead to MiMa errors when signature checks are enabled and could lead to issues when trying to refer to value class methods using reflection API. It would not affect the normal usage of value classes in Scala code compiled with the previous version of the compiler.
Other changes and fixes
Annotations
- Attempt implicit search for old style
implicit
parameters in Application matchArgs #19737
Artifacts
Backend
- Parallelise JVM backend - Scala 2 port #15392
- Fix Closure span assignment in makeClosure #15841
- Count size of parameters for platform limit check #18464
- Opt: Get rid of the LiftTry phase; instead handle things in the back-end. #18619
- Update asm to 9.6 #18712
- Don't emit line number for synthetic unit value #18717
- Avoid too eager transform of $outer for lhs & accessor rhs #18949
- Make more anonymous functions static #19251
- Fix deadlock in initialization of CoreBTypes using Lazy container #19298
- Fix(#17255): cannot find Scala companion module from Java #19773
- Change isStatic to isStaticOwner in hasLocalInstantiation #19803
- Emit switch bytecode when matching unions of a switchable type #20411
- Fix EnclosingMethod for lifted anonfun #20558
- Fix deterministically adding additional interfaces #20593
Coverage
- Correctly prettify names in coverage info #18542
- Port coverage filter options for packages and files #19727
Default parameters
- Lift all non trivial prefixes for default parameters #19739
- Fix default args lookup for given classes #20256
- Fix implicit search failure reporting #20261
Derivation
- Fix infinite loop in Mirror synthesis of unreducible match type #20133
Desugaring
- Make apply proxies work with overloaded ctors #19464
- Fix possible crash in Desugar #19567
- Add explanation to checkCaseClassInheritanceInvariant error msg #20141
Documentation
- [spec] remove implementation details from enum spec #18579
- [spec] some fixes to tuples #18582
- [spec] Cosmetic changes in the lexical syntax chapter #18608
- Spec: Update the list of tokens that can start/end statements. #18611
- Update syntax.md #18648
- Sync
main
withlanguage-reference-stable
#18718 - Completion assert diffs will now show completion source #18890
- Fix Export Doc #18952
- reference doc: fix incorrect syntax production #19017
- State all known limitations of right-associative extension methods #19210
- Update explicit-nulls.md #19327
- update old
issues.scala-lang.org
url #19606 - Update syntax.md #19670
- Clear the not-backported documentation changes queue #19699
- remove implementation from asInstanceOf #19753
- Port tailrec spec and adjustments to annotations section #19978
- Optimize the documentation JS files #20075
- Optimize main.js #20093
- Improve documentation of implicit conversions #20103
- Update Quotes.scala #20174
- Supplement structural givens doc #20327
- Fix three dead links in spec Types doc chapter #20337
- Avoid jpath in example #20775
Erasure
- Make eraseInfo work for classes with EmptyScopes #19550
- Don't re-balance AndTypes arising from supertypes #20400
Exports
- Do not propagate
@tailrec
to exported methods #19509 - Fix retained flags in exports #19636
- Add annotations in parameters for exports #20140
- Fix isAliasType #20195
GADTs
- Only cache base types when gadt state is empty #19562
Implicits
- Tweak convertible implicits fix #18727
- Run CheckStatic after UncacheGivenAliases #19318
- Add tests to verify that crash is fixed elsewhere. Fixes #19328 #19329
- Don't search for implicit conversions to NoType #19563
- Prefer extensions over conversions for member selection #19717
- Adjust owner in Interactive.contextOfPath causing crash in ImplicitSearch #19875
- Improve ConstraintHandling of SkolemTypes #20175
- Better error diagnostics under -explain-cyclic #20251
- Bring back ambiguity filter when we report an implicit not found error #20368
- Avoid stacked thisCall contexts #20488
Incremental Compilation
Inferencing
Infrastructure
- Fix listing release versions for bisect script. #19356
- Make tests resilient to exceptions thrown while reporting exceptions #19566
- Move CI management from lampepfl/dotty-ci #19697
- Switch to Java 17 in the CI #19703
- [regression] Publish nightly releases and releases using Java 8 #19722
- Bump scalacenter/sbt-dependency-submission from 2 to 3 #20440
Inline
- Fix regression: inline match crash when rhs uses private inlined methods #18595
- Add structural classes of dynamicApply before inlining #18766
- Inline transparent implicit parameters when typing Unapply trees #19646
- Specialized retained inline FunctionN apply methods #19801
- Restore pre-3.3.2 behavior of
inline implicit def
#19877 - Avoid crash after StopMacroExpansion #19883
- Check deprecation of inline methods #19914
- Fix by-name parameter in beta-reduction #20096
- Type desugared
transparent inline def unapply
call in the correct mode #20108 - Add warning for anonymous inline classes (#16723) #20291
- Avoid conversion of
Unit
type into()
term #20295 - Fix outerSelect in Inliner #20313
- Mark genSJSIR as disabled (rather than non-runnable) when no
-scalajs
. #20815 - Map over refs of
ImportType
s inTypeMap
#20837
Linting
- Implement -Xlint:private-shadow, type-parameter-shadow #17622
- Fix false positive in WUnused for renamed path-dependent imports #18468
- Fix false positive in WUnused for renamed path-dependent imports (2) #18617
- Fix wunused false positive on CanEqual #18641
- Fix #20146: attach the original name if there is an import selection for an indent #20163
- Use final result type to check selector bound #20989
Match Types
- Cover patterns using
reflect.TypeTest
in isMatchTypeShaped #19923 - Do match type reduction atPhaseNoLater than ElimOpaque #20017
- Use
MirrorSource.reduce
result forcompanionPath
#20207
Nullability
Opaque Types
Parser
- Tweak java getlitch not to skip zero #18491
- Fix(#18265): crash on extension method without type nor RHS #18743
- Simplify parameter handling in Parser #18993
- Add support for JEP-409 (sealed classes) + Add javacOpt directive #19080
- Parser simple expression error recovery change from
null
to???
#19103 - Warn when @volatile is used on vals #19462
- Fix(#16458): regression in xml syntax parsing #19522
- Fix(#16459) xml parse regression #19531
- Fix parsing of conditional expressions in parentheses #19985
Pattern Matching
- Propagate constant in result of inline match #18455
- Fix exhaustivity due to separate TypeVar lambdas #18616
- Consider extension methods in Space isSameUnapply #18642
- Fix unreachable warning in deeply nested sealed hierarchy #18706
- Disable match anaylsis in inlined trees #19190
- Warn about unchecked type tests in primitive catch cases #19206
- Remove unnecessary and recursive Space decomposition #19216
- Fix false unreachable due to opaqueness #19368
- Improve recursive decompose prefix fix #19375
- Allow constraining a parameter to Nothing #19397
- Add a test case, proving i15661 is fixed #19432
- Fix #20372: Check pattern match exhaustivity in inlined code #20403
Polyfunctions
- Check user defined PolyFunction refinements #18457
- Discard poly-functions when trying to resolve overloading #20181
Presentation Compiler
- Support completions for extension definition parameter #18331
- Fix: Don't collect map, flatMap, withFilter in for-comprehension #18430
- Bugfix: Catch exception from the compiler for broken shadowed pickles #18502
- Bugfix: highlight for enum type params #18528
- Bugfix: No signature help for local methods #18594
- Bugfix: add
moduleClass
imported symbols inIndexedContext
#18620 - Bugfix: Named args completions with default values #18633
- Fix: match completions for type aliases #18667
- Bugfix: add multiline comment completion #18703
- Bugfix: Backticked named arguments #18704
- Bugfix: [metals] Case completions for tuple type #18751
- Add missing -Yexplicit-nulls for presentation compiler #18776
- Completions should prepend, not replace as it is for Scala 2 #18803
- Bugfix: rename end marker #18838
- Remove redundant path calculation from Completions in PC #18889
- Instantiate Type Vars in completion labels of extension methods #18914
- Presentation compiler: Bugfix for semantic tokens and synthetic decorations #18955
- Show documentation for value forwarders in completions #19200
- Bugfix: Document highlight on class constructors #19209
- Improve signature help by more stable position calculation + better named arg support #19214
- Bugfix: Completions for extension methods with name conflict #19225
- Improvement: Support completions for implicit classes #19314
- Chore: Backport changes from Metals #19410
- Chore: backport changes from metals #19452
- Make order of renames and missing imports deterministic #19468
- Make PC more resilient to crashes #19488
- Fix goto-def on exported forwarders #19494
- Use comma counting for all signature help types #19520
- Chore: Backport changes from Metals #19592
- Backport pc changes from metals #19617
- PC: Replace CC with underlying type in completions #19638
- improvement: Replace synthetic decorations with inlay hints #19754
- Allow range selection on function parameter to select a parameter list #19777
- Weekly backport from metals #19787
- add
info
implementation to pc #19812 - Add custom matchers for completions (fuzzy search for presentation compiler) #19850
- Weekly metals backport #19921
- Stabilise returned completions by improving deduplication + extra completions for constructors #19976
- Fix active param index for empty param lists #20142
- Delias type members in hover #20173
- Interactive: handle context bounds in extension construct workaround #20201
- Fix: prefer non-export definition locations #20252
- Add pattern completion for unapply contexts #20274
- Don't show enum completions in new keyword context #20304
- Chore: Backport changes for presentation compiler #20345
- Chore: Bump mtags to latest stable #20442
- Weekly metals backport #20542
- Port pc find references from metals #20544
- Bugfix: Exclude newer LSP4j, which is built on JDK 11 #20771
Quotes
- Add missing span to synthesized product mirror #18354
- Improve non-static macro implementation error message #18405
- Fix scala 2 macros in traits with type parameters #18663
- Fallback erasing term references #18731
- Patch
underlyingArgument
to avoid mapping into modules #18923 - Avoid crashes on missing positions #19250
- Only evaluate transparent inline unapply once #19380
- Update
staging.Compiler.make
documentation #19428 - Error instead of StaleSymbol crash for certain cyclic macro dependencies #19549
- Refine handling of StaleSymbol type errors #19605
- Fix module symbol recovery from
NoClassDefFoundError
#19645 - Fix HOAS pattern example and error message #19655
- Add regression test and imporve -Xprint-suspension message #19688
- Disallow ill-staged references to local classes #19869
- Add regression test for #19909 #19915
- Avoid spurious
val
binding in quote pattern #19948 - Fix TermRef prefixes not having their type healed #20102
- Improve reporting in staging about the possible use of an incorrect class loader #20137
- Add regression test for issue 20309 #20387
REPL
- Repl truncation copes with null #17336
- Catch stackoverflow errors in the highlighter #19836
- Fix validity period of derived SingleDenotations #19983
- Fix #18383: Never consider top-level
import
s as unused in the repl. #20310 - Only consider methods with 0 parameters in valueOf #20543
Reflection
- Allow to beta reduce curried function applications in quotes reflect #18121
- Make check flags for
newMethod
,newVal
andnewBind
in Quotes API less restrictive #18217 - Normalise mirrorType for mirror Synthesis #19199
- Fix
TypeTreeTypeTest
to not matchTypeBoundsTree
s #19485 - Improve message when tree cannot be shown as source #19906
- Fix #19732: quotes.reflect.Ref incorrectly casting
This
toRefTree
#19930 - Set the inlining phase in the Context used for checking macro trees #20087
- Fix erasure crash for Inlined rhs of a context function closure #20398
- Fix #20458: do not expose ClassInfo in quotes reflect widenTermRefByName #20468
Reporting
- Warn if extension receiver already has member #17543
- Deprecation of case class elements #17911
- Check if a fatal warning issued in typer is silenced, before converting it into an error #18089
- Improve error message for inaccessible types #18406
- Elide companion defs to a
object
extendingAnyVal
#18451 - Add regression test for issue i18493 #18497
- Add better explanation to error message #18665
- Better error message when accessing private members #18690
- Improve assertion error message for
Apply
andTypeApply
#18700 - Fix import suggestion error logging #18707
- Improve message for discarded pure non-Unit values #18723
- Better error message when a pattern match extractor is not found. #18725
- Shorten traces for TypeMismatch errors under -explain #18742
- Give "did you mean ...?" hints also for simple identifiers #18747
- Explicitly state empty package in extendedLocationText #18748
- Better error for definition followed by keyword #18752
- Better explain message for 'pattern expected' #18753
- Add hint for nested quotes missing staged
Quotes
#18755 - Support src filter in -WConf (Closes #17635) #18783
- Better error messages for missing commas and more #18785
- Avoid diagnostic message forcing crashing the compiler #19113
- Make sure that the stacktrace is shown with
-Ydebug-unpickling
#19115 - Improve failure message of enum
fromOrdinal
/valueOf
#19182 - Improve
asExprOf
cast error formatting #19195 - Fix type mismatch error confusion between types with same simple name #19204
- Properly identify empty bounds in error message #19310
- Don't explain erroneous bounds #19338
- Better error diagnostics for cyclic references #19408
- Unify completion pos usage, fix presentation compiler crash in interpolation #19614
- Add formatters for Option, Map, Period, and Atoms #19658
- Bugfix: Choose correct signature is signatureHelp for overloaded methods #19707
- Fix #19402: emit proper error in absence of using in given definitions #19714
- Add error code to diagnostics about unused code #19780
- Improve error reporting for missing members #19800
- Avoid repetitions in name hints #19975
- Add note about type mismatch in automatically inserted apply argument #20023
- Make error reporting resilient to exception thrown while reporting #20158
- Remove duplicate comma from Matchable selector warning #20159
- Generalize warnings for top-level calls to Any or AnyRef methods #20312
- Make CheckUnused not slow. #20321
- Fix error message on setter with wrong type #20444
- Explain unresolvable references better #20477
- Add a specific error message for local final defs #20557
- Add a specific error message for local final defs #20557
Rewrites
- Extra check to avoid converting block expressions on the rhs of an in… #20043
Scala-JS
- Fix #18658: Handle varargs of generic types in
JSExportsGen
. #18659 - Consider static and non-static methods as non-double def #19400
- Fix #19528: Actually remove Dynamic from interfaces of native JS classes. #19536
Scaladoc
- Fix link resolving in scaladoc and fix invalid links in docs #18465
- Scaladoc - add option for dynamic side menu #19337
- Extend copyright into 2024 #19367
- Scaladoc: Fix "case case Foo" in enum's cases #19519
- Fix(#19377): show inherited abstract members in dedicated section #19552
- Fix(#16610): warn ignored Scaladoc on multiple enum cases #19555
- Parse search query param in Scaladoc #19669
- Fix #19524: Protect use of
HeaderIdGenerator
withsynchronized
. #19884 - Prevent HTML/XSS Injection in Scala Search #19980
- Fix scaladoc crash on Windows - illegal path character #20311
- Relax font-weight reset #20348
- Fix handling of right associative extension methods across scaladoc and printers #20467
SemanticDB
- Bugfix: in semanticdb make synthetic apply disambiguator consistent w/ Scala 2 implicit #17341
- Bugfix: Incorrect semanticdb span on Selectable #18576
- fix: semanticdb symbol creation when
targetName
set #20950 - Backport "Export diagnostics (including unused warnings) to SemanticDB" #20315
TASTy format
- Fix TASTy source position printer #19105
- Homogenize TASTy printer formatting #19139
- Used derived types to type arguments of dependent function type #19838
Tooling
- Bugfix: Completions for named args in wrong order #18702
- Don't add explanation twice #18779
- Presentation-compiler: Add synthetic decorations #18951
- Make sure that patches for 3.0 are also applied in later versions #19018
- Bugfix: Auto imports in worksheets in Scala 3 #19793
- Adjust the API name entry for nested classes #20279
- Improve source positions emited for synthetic unit in if-conditions #20431
- Fix declaring product of straight-to-jar compilation #20592
Transform
- List(...) optimization to avoid intermediate array #17166
- Add missing span to extension method select #18557
- Avoid some intermediate
List
s #18572 - Properly dealias tuple types when specializing #18724
- Fix #18816: Transfer the span of rewired
This
nodes infullyParameterizedDef
. #18840 - Fix condition in prefixIsElidable to prevent compiler crash #18924
- Fix purity check for val inside of object #19598
- Short-circuit isCheckable with classSymbol #19634
- Drop special treatment of function types in overloading resolution #19654
- Tweak parameter accessor scheme #19719
- Refactor hasOnlyLocalInstantiation to use isLocalToCompilationUnit #19886
- Avoid eta-reduction of
(..., f: T => R, ...) => f.apply(..)
intof
#19966 - Elide unit binding when beta-reducing #20085
- Fix handling of AppliedType aliases in outerPrefix #20190
- Fix overloaded default methods test in RefChecks #20218
- Correct Java signature for value classes appearing in type arguments #20463
- Reimplement support for type aliases in SAM types #18317
- Allow SAM types to contain match alias refinements #20092
- Allow SAM types to contain multiple refinements #20172
Tuples
- Handle TupleXXL in match analysis #19212
Typeclass Derivation
- Consider all parents when checking access to the children of a sum #19083
Typer
- Fix #17115: Try to normalize while computing
typeSize
. #18386 - Fix failing bounds check on default getter #18419
- Add default arguments to derived refined type #18435
- Use the unwidened type when casting structural calls #18527
- Fix #18649: Use loBound of param types when materializing a context function. #18651
- Keep qualifier of Ident when selecting setter #18714
- Use constructor's default getters in case class synthetic
apply
methods #18716 - Retract SynthesizeExtMethodReceiver mode when when going deeper in overloading resolution #18759
- Avoid crash arising from trying to find conversions from polymorphic singleton types #18760
- Identify structural trees on Match Type qualifiers #18765
- Encode the name of the attribute in Selectable.selectDynamic #18928
- Remove linearization requirement for override ref checks from java classes #18953
- Fix #19019: Always type self ValDefs in their outer context. #19030
- Check @TargetNAME when subtyping Refined Types #19081
- Space: Replace showType & make Space Showable #19370
- Reject wildcard types in using clauses #19459
- Don't leave underspecified SAM types in the code #19461
- Fix #19202: Passing NotNullInfos to a mutable field of a Completer #19463
- Also compute base classes of wildcardTypes #19465
- Fix(#15784): ident rule for pat match was too strict #19501
- Heal occurrences of => T between ElimByName and Erasure #19558
- Fix Java record problems (#19578) and (#19386) #19583
- Improve when deprecation warnings are emitted #19621
- Update phrasing for NotClassType explain error message #19635
- Fix(#i18645): overload ext method body in braces didn't compile #19651
- Remove dead code in Checking #19678
- Fix java typer problems with inner class references and raw types #19747
- Approximate MatchTypes with lub of case bodies, if non-recursive #19761
- Delay hard argument comparisons #20007
- Fix #19789: Merge same TypeParamRef in orDominator #20090
- Refactor constant folding of applications #20099
- Don't dealias when deciding which arguments to defer #20116
- Avoid the TypeVar.inst trap #20160
- Suppress "extension method will never be selected" for overrides #20164
- Avoid crash when superType does not exist after erasure #20188
- Retry
constraint.replace
afterconstraint.updateEntry
#20399 - Add special handling for comparisons with Singleton types #20474
- Fix isEffectivelySingleton #20486
- Add regression test for #20288 fixed in #20527 #20857
- Do not propagate
TypeError
s of ops fromTypeComparer#tryAlso
#21070
Contributors
Thank you to all the contributors who made this release possible 🎉
According to git shortlog -sn --no-merges 3.3.3..3.3.4
these are:
169 Wojciech Mazur
74 Dale Wijnand
72 Martin Odersky
70 Nicolas Stucki
29 Jamie Thompson
25 Sébastien Doeraene
22 Katarzyna Marek
19 Eugene Flesselle
19 Hamza REMMAL
19 i10416
18 Matt Bovel
15 Jędrzej Rochala
14 Jakub Ciesluk
14 Som Snytt
13 Szymon Rodziewicz
12 Paweł Marks
12 noti0na1
11 Jan Chyb
10 Carl
10 Guillaume Martres
6 Kacper Korban
6 Yilin Wei
5 Tomasz Godzik
4 Lorenzo Gabriele
4 Seth Tisue
3 Aviv Keller
3 Bersier
3 Derek Wickern
3 Florian3k
3 Hamza Remmal
3 Natsu Kagami
3 Stephane Bersier
3 aherlihy
3 dependabot[bot]
2 110416
2 Brice Jaglin
2 Eugene Yokota
2 Jakub Cieśluk
2 João Costa
2 Lucas Nouguier
2 Pascal Weisenburger
2 Quentin Bernet
2 Taro L. Saito
1 Adam Dąbrowski
1 Aleksander Boruch-Gruszecki
1 Ausmarton Zarino Fernandes
1 Decel
1 Georgi Krastev
1 Jisoo Park
1 John Duffell
1 João Ferreira
1 Kenji Yoshida
1 Lucy Martin
1 Lukas Rytz
1 Martin Kucera
1 Mikołaj Fornal
1 Nikita Gazarov
1 Ola Flisbäck
1 Olga Mazhara
1 Philippus Baalman
1 Raphael Jolly
1 Robert Stoll
1 Shardul Chiplunkar
1 Valentin Schneeberger
1 Yoonjae Jeon
1 danecek
1 philippus
1 rochala