Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: scala/scala3
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main@{1day}
Choose a base ref
...
head repository: scala/scala3
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 4 commits
  • 8 files changed
  • 2 contributors

Commits on Dec 18, 2024

  1. Configuration menu
    Copy the full SHA
    54312c6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    60b5dd1 View commit details
    Browse the repository at this point in the history
  3. Fix #22226: Use classOf[BoxedUnit] for Unit array in `ArrayConstruc…

    …tors`.
    
    The `ArrayConstructors` phase rewrites array constructors to calls
    to `scala.runtime.Arrays.newArray`. When it does that, it must pass
    the run-time `jl.Class` of the element type. Previously, it used
    `classOf[Unit]` when creating an `Array[Unit]` (or nested). That
    is not correct, as from the Java perspective, we need to create
    `Array[BoxedUnit]`.
    
    We now identify `elemType <: Unit` and replace it with `BoxedUnit`.
    
    ---
    
    This highlights a limitation of the Scala.js backend. We should
    rewrite calls to `newArray` in the backend to use direct array
    creation instead.
    sjrd committed Dec 18, 2024
    Configuration menu
    Copy the full SHA
    442e6a0 View commit details
    Browse the repository at this point in the history
  4. Fix #22226: Use classOf[BoxedUnit] for Unit array in `ArrayConstruc…

    …tors`. (#22238)
    
    The `ArrayConstructors` phase rewrites array constructors to calls to
    `scala.runtime.Arrays.newArray`. When it does that, it must pass the
    run-time `jl.Class` of the element type. Previously, it used
    `classOf[Unit]` when creating an `Array[Unit]` (or nested). That is not
    correct, as from the Java perspective, we need to create
    `Array[BoxedUnit]`.
    
    We now identify `elemType <: Unit` and replace it with `BoxedUnit`.
    
    ---
    
    This highlights a limitation of the Scala.js backend. We should rewrite
    calls to `newArray` in the backend to use direct array creation instead.
    hamzaremmal authored Dec 18, 2024
    Configuration menu
    Copy the full SHA
    bd1f004 View commit details
    Browse the repository at this point in the history
Loading