Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Test 3.3.4-RC1 #1398

Closed
wants to merge 1 commit into from
Closed

chore: Test 3.3.4-RC1 #1398

wants to merge 1 commit into from

Conversation

He-Pin
Copy link
Member

@He-Pin He-Pin commented Jul 18, 2024

Motivation:
Test with 3.3.4-RC1

@He-Pin
Copy link
Member Author

He-Pin commented Jul 18, 2024

@WojciechMazur Why it now reports:

[error] -- [E030] Match case Unreachable Error: /home/runner/work/pekko/pekko/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:3132:13 
[error] 3132 |        case t: (A, U) @unchecked           => t
[error]      |             ^^^^^^^^^^^^^^^^^^^^
[error]      |             Unreachable case
[error] one error found

https://github.com/apache/pekko/actions/runs/9985318652/job/27595952763?pr=1398#step:6:492

@WojciechMazur
Copy link
Contributor

It seems like we unfortunately backported a change that caused a regression, it can be minimized to

def Test[U, A](thisElem: A, thatElem: U) = {
  case object passedEnd
  val any: Seq[Any] = ???
  any.zip(any)
    .map {
      case (`passedEnd`, r: U @unchecked) => (thisElem, r)
      case (l: A @unchecked, `passedEnd`) => (l, thatElem)
      case t: (A, U) @unchecked           => t
    }
}

The 3rd case is reachable so it's a bug.
I'm doing a bisect on the compiler right now before I fill in an issue in the compiler, but it seems like the regression was present in the Scala Next series since 3.4.0 (approximately introduced ~ 02.09.2023) so I'm astonished I was not reported previously.
RC2 would either revert the change that caused the regression or would include a fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants