diff --git a/changelogs/3.7.0-RC1.md b/changelogs/3.7.0-RC1.md new file mode 100644 index 000000000000..e895cfc324e0 --- /dev/null +++ b/changelogs/3.7.0-RC1.md @@ -0,0 +1,266 @@ +# Highlights of the release + +- Add `@scala.annotation.internal.preview` annotation and `-preview` flag. [#22317](https://github.com/scala/scala3/pull/22317) +- Make SIP-52 `@publicInBinary` a stable feature in 3.7 [#22591](https://github.com/scala/scala3/pull/22591) +- Make SIP-58 - `Named Tuples` a stable feature in 3.7 [#22753](https://github.com/scala/scala3/pull/22753) +- Make SIP-62 - `Better Fors` a preview feature in 3.7 [#22776](https://github.com/scala/scala3/pull/22776) +- Implement SIP-61 `@unroll` annotation as experimental [#21693](https://github.com/scala/scala3/pull/21693) +- Upgrade Scala 2 Standard Library to 2.13.16 [#22386](https://github.com/scala/scala3/pull/22386) +- Upgrade Scala.js to 1.18.1. [#22397](https://github.com/scala/scala3/pull/22397) +- Upgrade Scala CLI to 1.7.0 [#22735](https://github.com/scala/scala3/pull/22735) +- Expression Compiler is now part of Scala 3 compiler [#22597](https://github.com/scala/scala3/pull/22597) +- Quotes API: Added `apply` methods to import selectors [#22457](https://github.com/scala/scala3/pull/22457) +- Quotes API: Implement experimental `summonIgnoring` method [#22417](https://github.com/scala/scala3/pull/22417) +- Quotes API: Add class parameters, flags, and privateWithin and annotations to experimental `newClass` methods [#21880](https://github.com/scala/scala3/pull/21880) +- Experimental: Capture Calculus - Inferring `tracked` modifier [#21628](https://github.com/scala/scala3/pull/21628) +- Presentation Compiler: Show inferred type on holes in hover [#21423](https://github.com/scala/scala3/pull/21423) +- JVM Backend: Fix #15736 blocking Scala 3 on Android [#22632](https://github.com/scala/scala3/pull/22632) +- REPL: add flag to quit after evaluating init script [#22636](https://github.com/scala/scala3/pull/22636) +- REPL: implement :jar (deprecate :require) [#22343](https://github.com/scala/scala3/pull/22343) +- Linting: Improvements to -Wunused and -Wconf [#20894](https://github.com/scala/scala3/pull/20894) +- Implicit parameters warn at call site without `using` keyword [#22441](https://github.com/scala/scala3/pull/22441) +- Minimal support for dependent case classes [#21698](https://github.com/scala/scala3/pull/21698) + +# Other changes and fixes + +## Annotations + +- Lift arguments of explicitly constructed annotations [#22553](https://github.com/scala/scala3/pull/22553) +- Fix copy of annotation on `@main` methods [#22582](https://github.com/scala/scala3/pull/22582) +- `@publicInBinary` has now effect on secondary constructors [#22630](https://github.com/scala/scala3/pull/22630) +- Fix mapping of annotations [#22407](https://github.com/scala/scala3/pull/22407) + +## Backend: Scala.js + +- Emit `js.NewArray` IR nodes when possible. [#22446](https://github.com/scala/scala3/pull/22446) + +## Classpath + +- Fix empty ClassPath attribute in one or more classpath jars causes crash [#22462](https://github.com/scala/scala3/pull/22462) + +## Documentation + +- Improve the usage of inclusive language [#22360](https://github.com/scala/scala3/pull/22360) + +## Erasure + +- Handle type aliases in contextFunctionResultTypeAfter [#21517](https://github.com/scala/scala3/pull/21517) +- Align erasure of `Array[Nothing]` and `Array[Null]` with Scala 2 [#22517](https://github.com/scala/scala3/pull/22517) + +## Desugering + +- Under `betterFors` don't drop the trailing `map` if it would result in a different type (also drop `_ => ()`) [#22619](https://github.com/scala/scala3/pull/22619) + +## Experimental: Capture Checking + +- Canonicalize capture variable subtype comparisons [#22299](https://github.com/scala/scala3/pull/22299) +- Permit Capture Refs for Uninitialized Type and Term Params in BiTypeMap [#22451](https://github.com/scala/scala3/pull/22451) +- Fix maximal capability handling and expand aliases [#22341](https://github.com/scala/scala3/pull/22341) + +## Experimental: Modularity + +- Widen skolem types when adding parent refinements [#22488](https://github.com/scala/scala3/pull/22488) + +## Experimental: Global Initialization Checker + +- Refactor the abstract domain of global init checker to compile http4s [#22179](https://github.com/scala/scala3/pull/22179) +- Fix global init checking crash when using a value defined in by-name closure [#22625](https://github.com/scala/scala3/pull/22625) + +## Experimentals + +- Expand value references to packages to their underlying package objects [#22011](https://github.com/scala/scala3/pull/22011) + +## Implicits + +- Restrict implicit args to using [#22458](https://github.com/scala/scala3/pull/22458) + +## Linting + +- Suppress spurious Suppression [#22383](https://github.com/scala/scala3/pull/22383) +- CheckUnused checks span.exists before testing its parts [#22504](https://github.com/scala/scala3/pull/22504) +- Don't warn retainedBody [#22510](https://github.com/scala/scala3/pull/22510) +- Handle Typeable [#22663](https://github.com/scala/scala3/pull/22663) +- Nowarn public implicit val class params [#22664](https://github.com/scala/scala3/pull/22664) +- Exclude synthetic this.m, Any.m from import lookup [#22695](https://github.com/scala/scala3/pull/22695) +- Warn unused member of anonymous class [#22729](https://github.com/scala/scala3/pull/22729) +- Ignore params to default arg getters [#22749](https://github.com/scala/scala3/pull/22749) +- Lazy val def member is pattern var [#22750](https://github.com/scala/scala3/pull/22750) +- Restore resolving prefixes of implicit Ident [#22751](https://github.com/scala/scala3/pull/22751) +- No warning for parameter of overriding method [#22757](https://github.com/scala/scala3/pull/22757) +- Dealias before checking for member in lint [#22708](https://github.com/scala/scala3/pull/22708) +- Warn on bad extensions of aliases [#22362](https://github.com/scala/scala3/pull/22362) +- Warn universal extensions on opaque types [#22502](https://github.com/scala/scala3/pull/22502) +- Discourage default arg for extension receiver [#22492](https://github.com/scala/scala3/pull/22492) +- Rename on import is never wildcard [#22712](https://github.com/scala/scala3/pull/22712) +- Collect nowarn symbols instead of skipping them [#22766](https://github.com/scala/scala3/pull/22766) + +## Match Types + +- Handle NoType in TypeComparer.disjointnessBoundary [#21520](https://github.com/scala/scala3/pull/21520) + +## Named Tuples + +- Special case NamedTuple.From for arguments derived from Tuple [#22449](https://github.com/scala/scala3/pull/22449) +- Generate mirrors for named tuples [#22469](https://github.com/scala/scala3/pull/22469) + +## Opaque Types + +- Fix stack overflow errors when generating opaque type proxies [#22479](https://github.com/scala/scala3/pull/22479) +- Fix inline proxy generation for opaque types referencing other opaque types [#22381](https://github.com/scala/scala3/pull/22381) +- Fix opaque types leaking rhs when inlined and found in type params (and a related stale symbol issue) [#22655](https://github.com/scala/scala3/pull/22655) + +## Overloading + +- Make overload pruning based on result types less aggressive [#21744](https://github.com/scala/scala3/pull/21744) + +## Parser + +- Fix annotations being not expected in the middle of an array type by java parser [#22391](https://github.com/scala/scala3/pull/22391) +- No outdent at eof [#22435](https://github.com/scala/scala3/pull/22435) +- Allow observing an indent after conditional [#22611](https://github.com/scala/scala3/pull/22611) +- Correctly detect colon lambda eol indent for optional brace of argument [#22477](https://github.com/scala/scala3/pull/22477) + +## Pattern Matching + +- Avoid crash in uninhab check in Space [#22601](https://github.com/scala/scala3/pull/22601) +- Account for named tuples in space subtraction [#22658](https://github.com/scala/scala3/pull/22658) +- Check exhaustivity of any case class [#22604](https://github.com/scala/scala3/pull/22604) + +## Presentation Compiler + +- Add enum type param support in sourceSymbol [#18603](https://github.com/scala/scala3/pull/18603) +- Map name position to desugared version of named context bound [#22374](https://github.com/scala/scala3/pull/22374) +- Hover and go to definition for named tuples [#22202](https://github.com/scala/scala3/pull/22202) +- Completions: do not complete package [#20532](https://github.com/scala/scala3/pull/20532) +- Print parens for single method argument only if a direct tuple type [#21510](https://github.com/scala/scala3/pull/21510) +- Improvement: use heuristic to figure out `nameSpan` if `pointDelta` too big [#22484](https://github.com/scala/scala3/pull/22484) +- Fix inferredTypeEdits for symbols [#22485](https://github.com/scala/scala3/pull/22485) +- Fix: Only fallback to the definition of a synthetic valdef if it is zero extent [#22551](https://github.com/scala/scala3/pull/22551) +- Better LSP completions inside of backticks [#22555](https://github.com/scala/scala3/pull/22555) +- Don't search for members in pc info when irrelevant [#22674](https://github.com/scala/scala3/pull/22674) +- Backport from Metals [#22426](https://github.com/scala/scala3/pull/22426) +- Backport from Metals [#22491](https://github.com/scala/scala3/pull/22491) +- Backport from Metals [#22665](https://github.com/scala/scala3/pull/22665) + +## Runner + +- Upgrade Scala CLI to [1.7.0 highlights](https://github.com/VirtusLab/scala-cli/releases/tag/v1.7.0) + - Switch to scalameta/scalafmt images of scalafmt 3.9.1+ [#3502](https://github.com/VirtusLab/scala-cli/pull/3502) + - Support the `--test` command line option for `run` subcommand [#3519](https://github.com/VirtusLab/scala-cli/pull/3519) + - Support the `--test` command line option for `package` subcommand [#3519](https://github.com/VirtusLab/scala-cli/pull/3519) + - Detect objects with main class in scripts [#3479](https://github.com/VirtusLab/scala-cli/pull/3479) + - Support for Scala.js 1.18.2 [#3454](https://github.com/VirtusLab/scala-cli/pull/3454) + - Support for Scala Native 0.5.7 [#3527](https://github.com/VirtusLab/scala-cli/pull/3527) + - Add support for running a main method from the test scope [#3502](https://github.com/VirtusLab/scala-cli/pull/3502) + +## Quotes + +- Add a check for correct Array shape in quotes.reflect.ClassOfConstant [#22033](https://github.com/scala/scala3/pull/22033) +- Fix issue with static `this` references erroring in quoted code [#22618](https://github.com/scala/scala3/pull/22618) +- Fix #21721: make case TypeBlock(_,_) not match non-type Block [#21722](https://github.com/scala/scala3/pull/21722) +- Make Ref.apply() return trees usable in the largest scope possible [#22240](https://github.com/scala/scala3/pull/22240) +- Make sure Block does not incorrectly match a TypeBlock [#22716](https://github.com/scala/scala3/pull/22716) +- Do not approximate prefixes when using memberType in reflect API [#22448](https://github.com/scala/scala3/pull/22448) +- Bring back pattern match exhaustivity checking for macros [#22622](https://github.com/scala/scala3/pull/22622) + +## REPL + +- REPL: JLine 3.29.0 (was 3.27.1) [#22679](https://github.com/scala/scala3/pull/22679) +- Repl: emit warning for the `:sh` command [#22694](https://github.com/scala/scala3/pull/22694) +- Add warning for :kind command [#22572](https://github.com/scala/scala3/pull/22572) + +## Reporting + +- Filter help renders box border [#22434](https://github.com/scala/scala3/pull/22434) +- Register nowarn when inlining [#22682](https://github.com/scala/scala3/pull/22682) +- Rule out exports of member of the current class [#22545](https://github.com/scala/scala3/pull/22545) + +## Scaladoc + +- Render `@deprecated` correctly even when named arguments weren't used [#21925](https://github.com/scala/scala3/pull/21925) +- Remove DRI from Scaladoc warnings [#22330](https://github.com/scala/scala3/pull/22330) + +## SemanticDB + +- Don't add `()` to semanticdb symbol for java variables [#22573](https://github.com/scala/scala3/pull/22573) +- Fix compiler crash when using betasty with missing java classfiles [#22599](https://github.com/scala/scala3/pull/22599) + +## Transform + +- Check only stable qual for import prefix [#22633](https://github.com/scala/scala3/pull/22633) +- Treat static vals as enclosures in lambdalift [#22452](https://github.com/scala/scala3/pull/22452) +- Record calls to constructors in lambdaLift [#22487](https://github.com/scala/scala3/pull/22487) +- Only check logicalOwners for methods, and not for classes, when looking for proxies [#22356](https://github.com/scala/scala3/pull/22356) +- Add error-checking when fetching rhs of trees from TASTy [#22565](https://github.com/scala/scala3/pull/22565) + +## Typer + +- Root of Java select must be class or rooted package [#21800](https://github.com/scala/scala3/pull/21800) +- Check if a prefix is valid before selecting from a type [#22368](https://github.com/scala/scala3/pull/22368) +- Preserve hard unions in widenSingletons [#22369](https://github.com/scala/scala3/pull/22369) +- Constructor proxy is restricted if class is protected [#22563](https://github.com/scala/scala3/pull/22563) +- Constructor companion gets privateWithin [#22627](https://github.com/scala/scala3/pull/22627) +- Revert lambda cleanup [#22697](https://github.com/scala/scala3/pull/22697) +- Avoid infinite recursion when looking for suggestions [#22361](https://github.com/scala/scala3/pull/22361) +- Fix cyclic check, regardless of definition order [#22342](https://github.com/scala/scala3/pull/22342) +- Avoid inf recursion in provablyDisjointClasses [#22489](https://github.com/scala/scala3/pull/22489) + +## Value Classes + +- Allow private members when computing the denotation of a NamedType [#22549](https://github.com/scala/scala3/pull/22549) + +## Other changes + +- Remove locale dependent FileSystemException check [#21633](https://github.com/scala/scala3/pull/21633) + +# Contributors + +Thank you to all the contributors who made this release possible 🎉 + +According to `git shortlog -sn --no-merges 3.6.4..3.7.0-RC1` these are: + +``` + 59 Martin Odersky + 43 Som Snytt + 33 Adrien Piquerez + 32 Hamza Remmal + 21 Wojciech Mazur + 19 aherlihy + 19 kasiaMarek + 15 Jan Chyb + 13 Dale Wijnand + 11 Kacper Korban + 10 EnzeXing + 7 Guillaume Martres + 7 Matt Bovel + 7 Oliver Bračevac + 7 noti0na1 + 6 Sébastien Doeraene + 5 HarrisL2 + 5 Jamie Thompson + 5 dependabot[bot] + 4 Joel Wilsson + 4 Seth Tisue + 3 Piotr Chabelski + 3 Roman Janusz + 3 anna herlihy + 2 David Hua + 1 Alec Theriault + 1 Daisy Li + 1 Daniel Thoma + 1 Dmitrii Naumenko + 1 Felix Herrmann + 1 He-Pin(kerr) + 1 João Ferreira + 1 Jędrzej Rochala + 1 Katarzyna Marek + 1 Kenji Yoshida + 1 Niklas Fiekas + 1 Rocco Mathijn Andela + 1 Vadim Chelyshov + 1 Yichen Xu + 1 adpi2 + 1 fan-tom + 1 philwalk + 1 rochala +``` diff --git a/changelogs/3.7.0-RC2.md b/changelogs/3.7.0-RC2.md new file mode 100644 index 000000000000..d97aaf5c9812 --- /dev/null +++ b/changelogs/3.7.0-RC2.md @@ -0,0 +1,27 @@ +# Backported changes + +- Backport "Check trailing blank line at EOF for OUTDENT" to 3.7.0 [#22942](https://github.com/scala/scala3/pull/22942) +- Backport "Fail compilation if multiple conflicting top-level private defs/vals are in the same package" to 3.7 [#22932](https://github.com/scala/scala3/pull/22932) +- Backport "Deprecate `Yno-kind-polymorphism`" to 3.7 [#22931](https://github.com/scala/scala3/pull/22931) +- Backport "Revert unconditional lint of Inlined expansion" to 3.7 [#22930](https://github.com/scala/scala3/pull/22930) +- Backport "Bump Scala CLI to v1.7.1 (was v1.7.0)" to 3.7 [#22929](https://github.com/scala/scala3/pull/22929) +- Backport "Fix #22794: Emit the definition of Arrays.newArray even though it's a primitive." to 3.7.0 [#22801](https://github.com/scala/scala3/pull/22801) + +# Reverted changes + +- Revert "Make overload pruning based on result types less aggressive" in 3.7.0 [#22940](https://github.com/scala/scala3/pull/22940) + +# Contributors + +Thank you to all the contributors who made this release possible 🎉 + +According to `git shortlog -sn --no-merges 3.7.0-RC1..3.7.0-RC2` these are: + +``` + 4 Som Snytt + 4 Wojciech Mazur + 1 Jan Chyb + 1 Piotr Chabelski + 1 Sébastien Doeraene + 1 Yichen Xu +``` diff --git a/changelogs/3.7.0-RC3.md b/changelogs/3.7.0-RC3.md new file mode 100644 index 000000000000..3408fbf56d59 --- /dev/null +++ b/changelogs/3.7.0-RC3.md @@ -0,0 +1,16 @@ +# Backported changes + +- Backport "Two fixes to NamedTuple pattern matching" to 3.7.0 [#22995](https://github.com/scala/scala3/pull/22995) +- Backport "changes to scala.caps in preparation to make Capability stable" to 3.7.0 [#22967](https://github.com/scala/scala3/pull/22967) + +# Contributors + +Thank you to all the contributors who made this release possible 🎉 + +According to `git shortlog -sn --no-merges 3.7.0-RC2..3.7.0-RC3` these are: + +``` + 4 Martin Odersky + 2 Wojciech Mazur + 1 Natsu Kagami +``` diff --git a/changelogs/3.7.0-RC4.md b/changelogs/3.7.0-RC4.md new file mode 100644 index 000000000000..2b39d025541f --- /dev/null +++ b/changelogs/3.7.0-RC4.md @@ -0,0 +1,15 @@ +# Backported changes + +- Backport "Upgrade to Scala.js 1.19.0." to 3.7 [#23035](https://github.com/scala/scala3/pull/23035) + + +# Contributors + +Thank you to all the contributors who made this release possible 🎉 + +According to `git shortlog -sn --no-merges 3.7.0-RC3..3.7.0-RC4` these are: + +``` + 2 Sébastien Doeraene + 1 Tomasz Godzik +``` diff --git a/changelogs/3.7.0.md b/changelogs/3.7.0.md new file mode 100644 index 000000000000..8cfe9c75116f --- /dev/null +++ b/changelogs/3.7.0.md @@ -0,0 +1,279 @@ +# Highlights of the release + +- Add `@scala.annotation.internal.preview` annotation and `-preview` flag. [#22317](https://github.com/scala/scala3/pull/22317) +- Make SIP-52 `@publicInBinary` a stable feature in 3.7 [#22591](https://github.com/scala/scala3/pull/22591) +- Make SIP-58 - `Named Tuples` a stable feature in 3.7 [#22753](https://github.com/scala/scala3/pull/22753) +- Make SIP-62 - `Better Fors` a preview feature in 3.7 [#22776](https://github.com/scala/scala3/pull/22776) +- Implement SIP-61 `@unroll` annotation as experimental [#21693](https://github.com/scala/scala3/pull/21693) +- Upgrade Scala 2 Standard Library to 2.13.16 [#22386](https://github.com/scala/scala3/pull/22386) +- Upgrade Scala.js to 1.19.0 [#23026](https://github.com/scala/scala3/pull/23026) +- Upgrade Scala CLI to 1.7.1 [#22843](https://github.com/scala/scala3/pull/22843) +- Expression Compiler is now part of Scala 3 compiler [#22597](https://github.com/scala/scala3/pull/22597) +- Quotes API: Added `apply` methods to import selectors [#22457](https://github.com/scala/scala3/pull/22457) +- Quotes API: Implement experimental `summonIgnoring` method [#22417](https://github.com/scala/scala3/pull/22417) +- Quotes API: Add class parameters, flags, and privateWithin and annotations to experimental `newClass` methods [#21880](https://github.com/scala/scala3/pull/21880) +- Experimental: Capture Calculus - Inferring `tracked` modifier [#21628](https://github.com/scala/scala3/pull/21628) +- Presentation Compiler: Show inferred type on holes in hover [#21423](https://github.com/scala/scala3/pull/21423) +- JVM Backend: Fix #15736 blocking Scala 3 on Android [#22632](https://github.com/scala/scala3/pull/22632) +- REPL: add flag to quit after evaluating init script [#22636](https://github.com/scala/scala3/pull/22636) +- REPL: implement :jar (deprecate :require) [#22343](https://github.com/scala/scala3/pull/22343) +- Linting: Improvements to -Wunused and -Wconf [#20894](https://github.com/scala/scala3/pull/20894) +- Implicit parameters warn at call site without `using` keyword [#22441](https://github.com/scala/scala3/pull/22441) +- Support for dependent case classes [#21698](https://github.com/scala/scala3/pull/21698) +- Deprecate `Yno-kind-polymorphism` [#22814](https://github.com/scala/scala3/pull/22814) + +# Other changes and fixes + +## Annotations + +- Lift arguments of explicitly constructed annotations [#22553](https://github.com/scala/scala3/pull/22553) +- Fix copy of annotation on `@main` methods [#22582](https://github.com/scala/scala3/pull/22582) +- `@publicInBinary` has now effect on secondary constructors [#22630](https://github.com/scala/scala3/pull/22630) +- Fix mapping of annotations [#22407](https://github.com/scala/scala3/pull/22407) + +## Backend: Scala.js + +- Emit `js.NewArray` IR nodes when possible. [#22446](https://github.com/scala/scala3/pull/22446) +- Fix #22794: Emit the definition of Arrays.newArray even though it's a primitive [#22797](https://github.com/scala/scala3/pull/22797) + +## Classpath + +- Fix empty ClassPath attribute in one or more classpath jars causes crash [#22462](https://github.com/scala/scala3/pull/22462) + +## Documentation + +- Improve the usage of inclusive language [#22360](https://github.com/scala/scala3/pull/22360) + +## Erasure + +- Handle type aliases in contextFunctionResultTypeAfter [#21517](https://github.com/scala/scala3/pull/21517) +- Align erasure of `Array[Nothing]` and `Array[Null]` with Scala 2 [#22517](https://github.com/scala/scala3/pull/22517) + +## Desugering + +- Under `betterFors` don't drop the trailing `map` if it would result in a different type (also drop `_ => ()`) [#22619](https://github.com/scala/scala3/pull/22619) + +## Experimental: Capture Checking + +- Canonicalize capture variable subtype comparisons [#22299](https://github.com/scala/scala3/pull/22299) +- Permit Capture Refs for Uninitialized Type and Term Params in BiTypeMap [#22451](https://github.com/scala/scala3/pull/22451) +- Fix maximal capability handling and expand aliases [#22341](https://github.com/scala/scala3/pull/22341) + +## Experimental: Modularity + +- Widen skolem types when adding parent refinements [#22488](https://github.com/scala/scala3/pull/22488) + +## Experimental: Global Initialization Checker + +- Refactor the abstract domain of global init checker to compile http4s [#22179](https://github.com/scala/scala3/pull/22179) +- Fix global init checking crash when using a value defined in by-name closure [#22625](https://github.com/scala/scala3/pull/22625) + +## Experimentals + +- Expand value references to packages to their underlying package objects [#22011](https://github.com/scala/scala3/pull/22011) + +## Implicits + +- Restrict implicit args to using [#22458](https://github.com/scala/scala3/pull/22458) + +## Linting + +- Suppress spurious Suppression [#22383](https://github.com/scala/scala3/pull/22383) +- CheckUnused checks span.exists before testing its parts [#22504](https://github.com/scala/scala3/pull/22504) +- Don't warn retainedBody [#22510](https://github.com/scala/scala3/pull/22510) +- Handle Typeable [#22663](https://github.com/scala/scala3/pull/22663) +- Nowarn public implicit val class params [#22664](https://github.com/scala/scala3/pull/22664) +- Exclude synthetic this.m, Any.m from import lookup [#22695](https://github.com/scala/scala3/pull/22695) +- Warn unused member of anonymous class [#22729](https://github.com/scala/scala3/pull/22729) +- Ignore params to default arg getters [#22749](https://github.com/scala/scala3/pull/22749) +- Lazy val def member is pattern var [#22750](https://github.com/scala/scala3/pull/22750) +- Restore resolving prefixes of implicit Ident [#22751](https://github.com/scala/scala3/pull/22751) +- No warning for parameter of overriding method [#22757](https://github.com/scala/scala3/pull/22757) +- Dealias before checking for member in lint [#22708](https://github.com/scala/scala3/pull/22708) +- Warn on bad extensions of aliases [#22362](https://github.com/scala/scala3/pull/22362) +- Warn universal extensions on opaque types [#22502](https://github.com/scala/scala3/pull/22502) +- Discourage default arg for extension receiver [#22492](https://github.com/scala/scala3/pull/22492) +- Rename on import is never wildcard [#22712](https://github.com/scala/scala3/pull/22712) +- Collect nowarn symbols instead of skipping them [#22766](https://github.com/scala/scala3/pull/22766) +- Revert unconditional lint of Inlined expansion [#22815](https://github.com/scala/scala3/pull/22815) + +## Match Types + +- Handle NoType in TypeComparer.disjointnessBoundary [#21520](https://github.com/scala/scala3/pull/21520) + +## Named Tuples + +- Special case NamedTuple.From for arguments derived from Tuple [#22449](https://github.com/scala/scala3/pull/22449) +- Generate mirrors for named tuples [#22469](https://github.com/scala/scala3/pull/22469) +- Two fixes to NamedTuple pattern matching [#22953](https://github.com/scala/scala3/pull/22953) + +## Opaque Types + +- Fix stack overflow errors when generating opaque type proxies [#22479](https://github.com/scala/scala3/pull/22479) +- Fix inline proxy generation for opaque types referencing other opaque types [#22381](https://github.com/scala/scala3/pull/22381) +- Fix opaque types leaking rhs when inlined and found in type params (and a related stale symbol issue) [#22655](https://github.com/scala/scala3/pull/22655) + +## Overloading + +- Make overload pruning based on result types less aggressive [#21744](https://github.com/scala/scala3/pull/21744) +- Fail compilation if multiple conflicting top-level private defs/vals are in the same package [#22759](https://github.com/scala/scala3/pull/22759) + +## Parser + +- Fix annotations being not expected in the middle of an array type by java parser [#22391](https://github.com/scala/scala3/pull/22391) +- No outdent at eof [#22435](https://github.com/scala/scala3/pull/22435) +- Allow observing an indent after conditional [#22611](https://github.com/scala/scala3/pull/22611) +- Correctly detect colon lambda eol indent for optional brace of argument [#22477](https://github.com/scala/scala3/pull/22477) + +## Pattern Matching + +- Avoid crash in uninhab check in Space [#22601](https://github.com/scala/scala3/pull/22601) +- Account for named tuples in space subtraction [#22658](https://github.com/scala/scala3/pull/22658) +- Check exhaustivity of any case class [#22604](https://github.com/scala/scala3/pull/22604) + +## Presentation Compiler + +- Add enum type param support in sourceSymbol [#18603](https://github.com/scala/scala3/pull/18603) +- Map name position to desugared version of named context bound [#22374](https://github.com/scala/scala3/pull/22374) +- Hover and go to definition for named tuples [#22202](https://github.com/scala/scala3/pull/22202) +- Completions: do not complete package [#20532](https://github.com/scala/scala3/pull/20532) +- Print parens for single method argument only if a direct tuple type [#21510](https://github.com/scala/scala3/pull/21510) +- Improvement: use heuristic to figure out `nameSpan` if `pointDelta` too big [#22484](https://github.com/scala/scala3/pull/22484) +- Fix inferredTypeEdits for symbols [#22485](https://github.com/scala/scala3/pull/22485) +- Fix: Only fallback to the definition of a synthetic valdef if it is zero extent [#22551](https://github.com/scala/scala3/pull/22551) +- Better LSP completions inside of backticks [#22555](https://github.com/scala/scala3/pull/22555) +- Don't search for members in pc info when irrelevant [#22674](https://github.com/scala/scala3/pull/22674) +- Backport from Metals [#22426](https://github.com/scala/scala3/pull/22426) +- Backport from Metals [#22491](https://github.com/scala/scala3/pull/22491) +- Backport from Metals [#22665](https://github.com/scala/scala3/pull/22665) + +## Runner + +- Upgrade Scala CLI to [1.7.1 highlights](https://github.com/VirtusLab/scala-cli/releases/tag/v1.7.1) + - Switch to scalameta/scalafmt images of scalafmt 3.9.1+ [#3502](https://github.com/VirtusLab/scala-cli/pull/3502) + - Support the `--test` command line option for `run` subcommand [#3519](https://github.com/VirtusLab/scala-cli/pull/3519) + - Support the `--test` command line option for `package` subcommand [#3519](https://github.com/VirtusLab/scala-cli/pull/3519) + - Detect objects with main class in scripts [#3479](https://github.com/VirtusLab/scala-cli/pull/3479) + - Support for Scala.js 1.18.2 [#3454](https://github.com/VirtusLab/scala-cli/pull/3454) + - Support for Scala Native 0.5.7 [#3527](https://github.com/VirtusLab/scala-cli/pull/3527) + - Add support for running a main method from the test scope [#3502](https://github.com/VirtusLab/scala-cli/pull/3502) + +## Quotes + +- Add a check for correct Array shape in quotes.reflect.ClassOfConstant [#22033](https://github.com/scala/scala3/pull/22033) +- Fix issue with static `this` references erroring in quoted code [#22618](https://github.com/scala/scala3/pull/22618) +- Fix #21721: make case TypeBlock(_,_) not match non-type Block [#21722](https://github.com/scala/scala3/pull/21722) +- Make Ref.apply() return trees usable in the largest scope possible [#22240](https://github.com/scala/scala3/pull/22240) +- Make sure Block does not incorrectly match a TypeBlock [#22716](https://github.com/scala/scala3/pull/22716) +- Do not approximate prefixes when using memberType in reflect API [#22448](https://github.com/scala/scala3/pull/22448) +- Bring back pattern match exhaustivity checking for macros [#22622](https://github.com/scala/scala3/pull/22622) + +## REPL + +- REPL: JLine 3.29.0 (was 3.27.1) [#22679](https://github.com/scala/scala3/pull/22679) +- Repl: emit warning for the `:sh` command [#22694](https://github.com/scala/scala3/pull/22694) +- Add warning for :kind command [#22572](https://github.com/scala/scala3/pull/22572) +- Check trailing blank line at EOF for OUTDENT [#22855](https://github.com/scala/scala3/pull/22855) + +## Reporting + +- Filter help renders box border [#22434](https://github.com/scala/scala3/pull/22434) +- Register nowarn when inlining [#22682](https://github.com/scala/scala3/pull/22682) +- Rule out exports of member of the current class [#22545](https://github.com/scala/scala3/pull/22545) + +## Standard Library + +- Changes in preparation to make `caps.Capability` stable [#22849](https://github.com/scala/scala3/pull/22849) +- Mitigate change in status of scala.caps [#22956](https://github.com/scala/scala3/pull/22956) + +## Scaladoc + +- Render `@deprecated` correctly even when named arguments weren't used [#21925](https://github.com/scala/scala3/pull/21925) +- Remove DRI from Scaladoc warnings [#22330](https://github.com/scala/scala3/pull/22330) + +## SemanticDB + +- Don't add `()` to semanticdb symbol for java variables [#22573](https://github.com/scala/scala3/pull/22573) +- Fix compiler crash when using betasty with missing java classfiles [#22599](https://github.com/scala/scala3/pull/22599) + +## Transform + +- Check only stable qual for import prefix [#22633](https://github.com/scala/scala3/pull/22633) +- Treat static vals as enclosures in lambdalift [#22452](https://github.com/scala/scala3/pull/22452) +- Record calls to constructors in lambdaLift [#22487](https://github.com/scala/scala3/pull/22487) +- Only check logicalOwners for methods, and not for classes, when looking for proxies [#22356](https://github.com/scala/scala3/pull/22356) +- Add error-checking when fetching rhs of trees from TASTy [#22565](https://github.com/scala/scala3/pull/22565) + +## Typer + +- Root of Java select must be class or rooted package [#21800](https://github.com/scala/scala3/pull/21800) +- Check if a prefix is valid before selecting from a type [#22368](https://github.com/scala/scala3/pull/22368) +- Preserve hard unions in widenSingletons [#22369](https://github.com/scala/scala3/pull/22369) +- Constructor proxy is restricted if class is protected [#22563](https://github.com/scala/scala3/pull/22563) +- Constructor companion gets privateWithin [#22627](https://github.com/scala/scala3/pull/22627) +- Revert lambda cleanup [#22697](https://github.com/scala/scala3/pull/22697) +- Avoid infinite recursion when looking for suggestions [#22361](https://github.com/scala/scala3/pull/22361) +- Fix cyclic check, regardless of definition order [#22342](https://github.com/scala/scala3/pull/22342) +- Avoid inf recursion in provablyDisjointClasses [#22489](https://github.com/scala/scala3/pull/22489) + +## Value Classes + +- Allow private members when computing the denotation of a NamedType [#22549](https://github.com/scala/scala3/pull/22549) + +## Other changes + +- Remove locale dependent FileSystemException check [#21633](https://github.com/scala/scala3/pull/21633) + +# Contributors + +Thank you to all the contributors who made this release possible 🎉 + +According to `git shortlog -sn --no-merges 3.6.4..3.7.0` these are: + +``` + 63 Martin Odersky + 47 Som Snytt + 33 Adrien Piquerez + 32 Hamza Remmal + 29 Wojciech Mazur + 19 aherlihy + 19 kasiaMarek + 16 Jan Chyb + 13 Dale Wijnand + 11 Kacper Korban + 10 EnzeXing + 9 Sébastien Doeraene + 7 Guillaume Martres + 7 Matt Bovel + 7 Oliver Bračevac + 7 noti0na1 + 5 HarrisL2 + 5 Jamie Thompson + 5 dependabot[bot] + 4 Joel Wilsson + 4 Piotr Chabelski + 4 Seth Tisue + 3 Roman Janusz + 3 anna herlihy + 2 David Hua + 2 Tomasz Godzik + 2 Yichen Xu + 1 Alec Theriault + 1 Daisy Li + 1 Daniel Thoma + 1 Dmitrii Naumenko + 1 Felix Herrmann + 1 He-Pin(kerr) + 1 João Ferreira + 1 Jędrzej Rochala + 1 Katarzyna Marek + 1 Kenji Yoshida + 1 Natsu Kagami + 1 Niklas Fiekas + 1 Rocco Mathijn Andela + 1 Vadim Chelyshov + 1 adpi2 + 1 fan-tom + 1 philwalk + 1 rochala +``` diff --git a/changelogs/3.7.1-RC1.md b/changelogs/3.7.1-RC1.md new file mode 100644 index 000000000000..8f61c0d2bf32 --- /dev/null +++ b/changelogs/3.7.1-RC1.md @@ -0,0 +1,157 @@ +# Highlights of the release + +- Support for JDK 25 [#23004](https://github.com/scala/scala3/pull/23004) +- Warn if interpolator uses toString [#20578](https://github.com/scala/scala3/pull/20578) +- Warn if match in block is not used for PartialFunction [#23002](https://github.com/scala/scala3/pull/23002) + +# Other changes and fixes + +## Annotations + +- Approximate annotated types in `wildApprox` [#22893](https://github.com/scala/scala3/pull/22893) +- Keep unused annot on params [#23037](https://github.com/scala/scala3/pull/23037) + +## Erasure + +- Disallow context function types as value-class parameters [#23015](https://github.com/scala/scala3/pull/23015) + +## Experimental: Capture Checking + +- Two fixes to handling of abstract types with cap bounds [#22838](https://github.com/scala/scala3/pull/22838) +- Drop idempotent type maps [#22910](https://github.com/scala/scala3/pull/22910) +- Fix setup of class constructors [#22980](https://github.com/scala/scala3/pull/22980) + +## Named Tuples + +- Call dealias after stripping type variables for tupleElementTypesUpTo [#23005](https://github.com/scala/scala3/pull/23005) +- Avoid loosing denotations of named types during `integrate` [#22839](https://github.com/scala/scala3/pull/22839) + +## Experimental: Unroll + +- Fix #22833: allow unroll annotation in methods of final class [#22926](https://github.com/scala/scala3/pull/22926) + +## Experimental: Referencable Package Objects + +- Add experimental.packageObjectValues language setting [#23001](https://github.com/scala/scala3/pull/23001) + +## Exports + +- Respect export alias for default arg forwarder [#21109](https://github.com/scala/scala3/pull/21109) + +## Extension Methods + +- Extension check checks for no parens not empty parens [#22825](https://github.com/scala/scala3/pull/22825) + +## GADTs + +- Fix: Prevent GADT reasoning in pattern alternatives [#22853](https://github.com/scala/scala3/pull/22853) + +## Linting + +- Dealias when looking into imports [#22889](https://github.com/scala/scala3/pull/22889) +- Process Export for unused check [#22984](https://github.com/scala/scala3/pull/22984) +- Drill into QuotePattern bindings symbol info [#22987](https://github.com/scala/scala3/pull/22987) +- No warn implicit param of overriding method [#22901](https://github.com/scala/scala3/pull/22901) +- No warn for evidence params of marker traits such as NotGiven [#22985](https://github.com/scala/scala3/pull/22985) + +## Initialization + +- Check for tasty error in template trees. [#22867](https://github.com/scala/scala3/pull/22867) + +## Metaprogramming: Compile-time + +- Fix issue with certain synthetics missing in compiletime.typechecks [#22978](https://github.com/scala/scala3/pull/22978) + +## Pattern Matching + +- Fix existing GADT constraints with introduced pattern-bound symbols [#22928](https://github.com/scala/scala3/pull/22928) + +## Pickling + +- Fix fromProduct synthesized code for parameter-dependent case classes [#22961](https://github.com/scala/scala3/pull/22961) + +## Presentation Compiler + +- Completions for requests just before string [#22894](https://github.com/scala/scala3/pull/22894) +- Fix: go to def should lead to all: apply, object and class [#22771](https://github.com/scala/scala3/pull/22771) +- Ignore ending `$` when looking at end marker names [#22798](https://github.com/scala/scala3/pull/22798) +- Feature: Skip auto importing symbols we know are wrong in current context [#22813](https://github.com/scala/scala3/pull/22813) +- Show the Autofill completion case as what would be auto-filled [#22819](https://github.com/scala/scala3/pull/22819) +- Bugfix: Fix issues with annotations not detected [#22878](https://github.com/scala/scala3/pull/22878) +- Improvement: Rework IndexedContext to reuse the previously calculated scopes [#22898](https://github.com/scala/scala3/pull/22898) +- Pc: Properly adjust indentation when inlining blocks [#22915](https://github.com/scala/scala3/pull/22915) +- Improvement: Support using directives in worksheets [#22957](https://github.com/scala/scala3/pull/22957) +- Fix: show hover for synthetics if explicitly used [#22973](https://github.com/scala/scala3/pull/22973) +- Pc: fix: inline value when def indentation equals 2 [#22990](https://github.com/scala/scala3/pull/22990) + +## Rewrites + +- Fix insertion of `using` in applications with trailing lambda syntax [#22937](https://github.com/scala/scala3/pull/22937) +- Test chars safely when highlighting [#22918](https://github.com/scala/scala3/pull/22918) + +## Reporting + +- Print infix operations in infix form [#22854](https://github.com/scala/scala3/pull/22854) + +## Scaladoc + +- Chore: add support for 'abstract override' modifier [#22802](https://github.com/scala/scala3/pull/22802) +- Scaladoc: fix generation of unique header ids [#22779](https://github.com/scala/scala3/pull/22779) + +## Typer + +- Disallow context bounds in type lambdas [#22659](https://github.com/scala/scala3/pull/22659) +- Refuse trailing type parameters in extractors [#22699](https://github.com/scala/scala3/pull/22699) +- Fix #22724: Revert the PolyType case in #21744 [#22820](https://github.com/scala/scala3/pull/22820) +- Fix isGenericArrayElement for higher-kinded types [#22938](https://github.com/scala/scala3/pull/22938) +- Tighten condition to preserve denotation in IntegrateMap [#23060](https://github.com/scala/scala3/pull/23060) + +## Transform + +- Mix in the `productPrefix` hash statically in case class `hashCode` [#22865](https://github.com/scala/scala3/pull/22865) + +## Value Classes + +- Fix #21918: Disallow value classes extending type aliases of AnyVal [#23021](https://github.com/scala/scala3/pull/23021) + + +# Contributors + +Thank you to all the contributors who made this release possible 🎉 + +According to `git shortlog -sn --no-merges 3.7.0..3.7.1-RC1` these are: + +``` + 135 Martin Odersky + 27 Som Snytt + 13 Matt Bovel + 10 Wojciech Mazur + 9 Hamza Remmal + 5 Quentin Bernet + 5 Tomasz Godzik + 4 aherlihy + 3 HarrisL2 + 3 Jan Chyb + 3 Natsu Kagami + 3 Ondrej Lhotak + 3 Sébastien Doeraene + 2 Piotr Chabelski + 2 Yichen Xu + 2 Yoonjae Jeon + 2 kasiaMarek + 1 Aleksey Troitskiy + 1 Daisy Li + 1 Dale Wijnand + 1 Jan-Pieter van den Heuvel + 1 Jędrzej Rochala + 1 Kacper Korban + 1 Katarzyna Marek + 1 Lukas Rytz + 1 Mikołaj Fornal + 1 Nikita Glushchenko + 1 Oliver Bračevac + 1 Ondřej Lhoták + 1 dependabot[bot] + 1 noti0na1 + 1 philippus +``` diff --git a/changelogs/3.7.1-RC2.md b/changelogs/3.7.1-RC2.md new file mode 100644 index 000000000000..6a9b9d88bb79 --- /dev/null +++ b/changelogs/3.7.1-RC2.md @@ -0,0 +1,25 @@ +# Backported chnages + +- Backport "chore: filter allowed source versions by import and by settings" to 3.7.1 (#23231) +- Backport "Bump Scala CLI to v1.8.0 (was v1.7.1)" to 3.7.1 (#23230) +- Backport "Mention extension in unused param warning" to 3.7.1 (#23229) +- Backport "Revert recent changes to opaque type proxy generation" to 3.7.1 (#23228) +- Backport "Remove premature caching of lookups for unused lint" to 3.7.1 (#23227) + +# Reverted changes + +- Revert "Make overload pruning based on result types less aggressive (#21744)" in 3.7.1-RC2 (#23239) + +# Contributors + +Thank you to all the contributors who made this release possible 🎉 + +According to `git shortlog -sn --no-merges 3.7.1-RC1..3.7.1-RC2` these are: + +``` + 4 Hamza Remmal + 4 Som Snytt + 3 Jan Chyb + 3 Wojciech Mazur + 1 Piotr Chabelski +``` diff --git a/changelogs/3.7.1.md b/changelogs/3.7.1.md new file mode 100644 index 000000000000..4ffb178aea89 --- /dev/null +++ b/changelogs/3.7.1.md @@ -0,0 +1,171 @@ +# Highlights of the release + +- Support for JDK 25 [#23004](https://github.com/scala/scala3/pull/23004) +- Warn if interpolator uses toString [#20578](https://github.com/scala/scala3/pull/20578) +- Warn if match in block is not used for PartialFunction [#23002](https://github.com/scala/scala3/pull/23002) + +# Other changes and fixes + +## Annotations + +- Approximate annotated types in `wildApprox` [#22893](https://github.com/scala/scala3/pull/22893) +- Keep unused annot on params [#23037](https://github.com/scala/scala3/pull/23037) + +## Erasure + +- Disallow context function types as value-class parameters [#23015](https://github.com/scala/scala3/pull/23015) + +## Experimental: Capture Checking + +- Two fixes to handling of abstract types with cap bounds [#22838](https://github.com/scala/scala3/pull/22838) +- Drop idempotent type maps [#22910](https://github.com/scala/scala3/pull/22910) +- Fix setup of class constructors [#22980](https://github.com/scala/scala3/pull/22980) + +## Experimental: Unroll + +- Fix #22833: allow unroll annotation in methods of final class [#22926](https://github.com/scala/scala3/pull/22926) + +## Experimental: Referencable Package Objects + +- Add experimental.packageObjectValues language setting [#23001](https://github.com/scala/scala3/pull/23001) + +## Exports + +- Respect export alias for default arg forwarder [#21109](https://github.com/scala/scala3/pull/21109) + +## Extension Methods + +- Extension check checks for no parens not empty parens [#22825](https://github.com/scala/scala3/pull/22825) + +## GADTs + +- Fix: Prevent GADT reasoning in pattern alternatives [#22853](https://github.com/scala/scala3/pull/22853) + +## Linting + +- Dealias when looking into imports [#22889](https://github.com/scala/scala3/pull/22889) +- Process Export for unused check [#22984](https://github.com/scala/scala3/pull/22984) +- Drill into QuotePattern bindings symbol info [#22987](https://github.com/scala/scala3/pull/22987) +- No warn implicit param of overriding method [#22901](https://github.com/scala/scala3/pull/22901) +- No warn for evidence params of marker traits such as NotGiven [#22985](https://github.com/scala/scala3/pull/22985) +- Mention extension in unused param warning [#23132](https://github.com/scala/scala3/pull/23132) +- Remove premature caching of lookups for unused lint [#22982](https://github.com/scala/scala3/pull/22982) +- Enclosing package p.q not visible as q [#23069](https://github.com/scala/scala3/pull/23069) + +## Inline + +- Revert recent changes to opaque type proxy generation [#23059](https://github.com/scala/scala3/pull/23059) + +## Initialization + +- Check for tasty error in template trees. [#22867](https://github.com/scala/scala3/pull/22867) + +## Metaprogramming: Compile-time + +- Fix issue with certain synthetics missing in compiletime.typechecks [#22978](https://github.com/scala/scala3/pull/22978) + +## Named Tuples + +- Call dealias after stripping type variables for tupleElementTypesUpTo [#23005](https://github.com/scala/scala3/pull/23005) +- Avoid loosing denotations of named types during `integrate` [#22839](https://github.com/scala/scala3/pull/22839) + +## Pattern Matching + +- Fix existing GADT constraints with introduced pattern-bound symbols [#22928](https://github.com/scala/scala3/pull/22928) + +## Pickling + +- Fix fromProduct synthesized code for parameter-dependent case classes [#22961](https://github.com/scala/scala3/pull/22961) + +## Presentation Compiler + +- Completions for requests just before string [#22894](https://github.com/scala/scala3/pull/22894) +- Fix: go to def should lead to all: apply, object and class [#22771](https://github.com/scala/scala3/pull/22771) +- Ignore ending `$` when looking at end marker names [#22798](https://github.com/scala/scala3/pull/22798) +- Feature: Skip auto importing symbols we know are wrong in current context [#22813](https://github.com/scala/scala3/pull/22813) +- Show the Autofill completion case as what would be auto-filled [#22819](https://github.com/scala/scala3/pull/22819) +- Bugfix: Fix issues with annotations not detected [#22878](https://github.com/scala/scala3/pull/22878) +- Improvement: Rework IndexedContext to reuse the previously calculated scopes [#22898](https://github.com/scala/scala3/pull/22898) +- Pc: Properly adjust indentation when inlining blocks [#22915](https://github.com/scala/scala3/pull/22915) +- Improvement: Support using directives in worksheets [#22957](https://github.com/scala/scala3/pull/22957) +- Fix: show hover for synthetics if explicitly used [#22973](https://github.com/scala/scala3/pull/22973) +- Pc: fix: inline value when def indentation equals 2 [#22990](https://github.com/scala/scala3/pull/22990) + +## Rewrites + +- Fix insertion of `using` in applications with trailing lambda syntax [#22937](https://github.com/scala/scala3/pull/22937) +- Test chars safely when highlighting [#22918](https://github.com/scala/scala3/pull/22918) + +## Reporting + +- Print infix operations in infix form [#22854](https://github.com/scala/scala3/pull/22854) + +## Runner + +- Bump Scala CLI to v1.8.0 (was v1.7.1) [#23168](https://github.com/scala/scala3/pull/23168) + +## Scaladoc + +- Chore: add support for 'abstract override' modifier [#22802](https://github.com/scala/scala3/pull/22802) +- Scaladoc: fix generation of unique header ids [#22779](https://github.com/scala/scala3/pull/22779) + +## Settings + +- Filter allowed source versions by import and by settings [#23215](https://github.com/scala/scala3/pull/23215) + +## Typer + +- Disallow context bounds in type lambdas [#22659](https://github.com/scala/scala3/pull/22659) +- Refuse trailing type parameters in extractors [#22699](https://github.com/scala/scala3/pull/22699) +- Fix #22724: Revert the PolyType case in #21744 [#22820](https://github.com/scala/scala3/pull/22820) +- Fix isGenericArrayElement for higher-kinded types [#22938](https://github.com/scala/scala3/pull/22938) +- Tighten condition to preserve denotation in IntegrateMap [#23060](https://github.com/scala/scala3/pull/23060) + +## Transform + +- Mix in the `productPrefix` hash statically in case class `hashCode` [#22865](https://github.com/scala/scala3/pull/22865) + +## Value Classes + +- Fix #21918: Disallow value classes extending type aliases of AnyVal [#23021](https://github.com/scala/scala3/pull/23021) + +# Contributors + +Thank you to all the contributors who made this release possible 🎉 + +According to `git shortlog -sn --no-merges 3.7.0..3.7.1` these are: + +``` + 135 Martin Odersky + 31 Som Snytt + 14 Wojciech Mazur + 13 Hamza Remmal + 13 Matt Bovel + 6 Jan Chyb + 5 Quentin Bernet + 5 Tomasz Godzik + 4 aherlihy + 3 HarrisL2 + 3 Natsu Kagami + 3 Ondrej Lhotak + 3 Piotr Chabelski + 3 Sébastien Doeraene + 2 Yichen Xu + 2 Yoonjae Jeon + 2 kasiaMarek + 1 Aleksey Troitskiy + 1 Daisy Li + 1 Dale Wijnand + 1 Jan-Pieter van den Heuvel + 1 Jędrzej Rochala + 1 Kacper Korban + 1 Katarzyna Marek + 1 Lukas Rytz + 1 Mikołaj Fornal + 1 Nikita Glushchenko + 1 Oliver Bračevac + 1 Ondřej Lhoták + 1 dependabot[bot] + 1 noti0na1 + 1 philippus +``` diff --git a/docs/_docs/reference/contextual/context-bounds.md b/docs/_docs/reference/contextual/context-bounds.md index 60357b3f098d..c0891aa1800e 100644 --- a/docs/_docs/reference/contextual/context-bounds.md +++ b/docs/_docs/reference/contextual/context-bounds.md @@ -47,7 +47,7 @@ Since the context parameter now has a name, it can be referred to in the body of `reduce`. An example is the `m.unit` reference in the definition above. If the context bound does not carry an `as` clause, the generated witness parameter gets a compiler-synthesized name. However, a [currently experimental -language extension](../experimental/default-names-context-bounds.md) would in this case give the context parameter the same name as the bound type parameter. +language extension](../experimental/typeclasses.md#better-default-names-for-context-bounds) would in this case give the context parameter the same name as the bound type parameter. Named context bounds were introduced in Scala 3.6. diff --git a/docs/_docs/reference/experimental/typeclasses.md b/docs/_docs/reference/experimental/typeclasses.md index add5853e10ba..0fc4fa043940 100644 --- a/docs/_docs/reference/experimental/typeclasses.md +++ b/docs/_docs/reference/experimental/typeclasses.md @@ -25,7 +25,7 @@ in source version `future` if the additional experimental language import `modul ``` It is intended to turn features described here into proposals under the Scala improvement process. A first installment is SIP 64, which covers some syntactic changes, names for context bounds, multiple context bounds and deferred givens. This SIP has been accepted for inclusion in the language and will be released in Scala 3.6. The remaining elements -that concern type classes are described in the following. There is also a separate [page on modularity improvements](../modularity.md) that describes proposed additions not directly related to type classes. +that concern type classes are described in the following. There is also a separate [page on modularity improvements](modularity.md) that describes proposed additions not directly related to type classes. ## Generalizing Context Bounds diff --git a/docs/_docs/reference/features-classification.md b/docs/_docs/reference/features-classification.md index 550130780b44..ce5318859ce0 100644 --- a/docs/_docs/reference/features-classification.md +++ b/docs/_docs/reference/features-classification.md @@ -40,7 +40,7 @@ These constructs replace existing constructs with the aim of making the language - [Extension methods](contextual/extension-methods.md) replace implicit classes with a clearer and simpler mechanism. - [Opaque type aliases](other-new-features/opaques.md) replace most uses of value classes while guaranteeing absence of boxing. - - [Top-level definitions](dropped-features/package-objects.md) replace package objects, dropping syntactic boilerplate. + - [Top-level definitions](other-new-features/toplevel-definitions.md) replace package objects, dropping syntactic boilerplate. - [Export clauses](other-new-features/export.md) provide a simple and general way to express aggregation, which can replace the previous facade pattern of package objects inheriting from classes. diff --git a/docs/_docs/reference/other-new-features/toplevel-definitions.md b/docs/_docs/reference/other-new-features/toplevel-definitions.md index b1793bd1941c..29da270729cb 100644 --- a/docs/_docs/reference/other-new-features/toplevel-definitions.md +++ b/docs/_docs/reference/other-new-features/toplevel-definitions.md @@ -1,7 +1,7 @@ --- layout: doc-page title: "Toplevel Definitions" -nightlyOf: https://docs.scala-lang.org/scala3/reference/dropped-features/toplevel-definitions.html +nightlyOf: https://docs.scala-lang.org/scala3/reference/other-new-features/toplevel-definitions.html --- All kind of definitions can now be written at the top-level. diff --git a/docs/_docs/reference/overview.md b/docs/_docs/reference/overview.md index bdb8aa74c1aa..35a3a58733f1 100644 --- a/docs/_docs/reference/overview.md +++ b/docs/_docs/reference/overview.md @@ -46,7 +46,7 @@ These constructs replace existing constructs with the aim of making the language replace implicit classes with a clearer and simpler mechanism. - [Opaque type aliases](other-new-features/opaques.md) replace most uses of value classes while guaranteeing the absence of boxing. -- [Top-level definitions](dropped-features/package-objects.md) +- [Top-level definitions](other-new-features/toplevel-definitions.md) replace package objects, dropping syntactic boilerplate. - [Export clauses](other-new-features/export.md) provide a simple and general way to express aggregation, which can replace diff --git a/docs/_docs/reference/preview/overview.md b/docs/_docs/reference/preview/overview.md index ec8d36bdfd25..62fc499487a1 100644 --- a/docs/_docs/reference/preview/overview.md +++ b/docs/_docs/reference/preview/overview.md @@ -2,6 +2,7 @@ layout: doc-page title: "Preview" nightlyOf: https://docs.scala-lang.org/scala3/reference/preview/overview.html +redirectFrom: overview.html --- ## Preview language features diff --git a/docs/sidebar.yml b/docs/sidebar.yml index 48b683d4e182..f0ca5433d649 100644 --- a/docs/sidebar.yml +++ b/docs/sidebar.yml @@ -88,6 +88,7 @@ subsection: - page: reference/other-new-features/experimental-defs.md - page: reference/other-new-features/preview-defs.md - page: reference/other-new-features/binary-literals.md + - page: reference/other-new-features/toplevel-definitions.md - title: Other Changed Features directory: changed-features index: reference/changed-features/changed-features.md