Skip to content

Commit 49198f0

Browse files
dwijnandWojciechMazur
authored andcommitted
Fixed false positive unreachable local object
I think this was fixed in PR 21000, but I didn't check.
1 parent 60a8479 commit 49198f0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/warn/i21218.scala

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
def Test[U, A](thisElem: A, thatElem: U) = {
2+
case object passedEnd
3+
val any: Seq[Any] = ???
4+
any.zip(any)
5+
.map {
6+
case (`passedEnd`, r: U @unchecked) => (thisElem, r)
7+
case (l: A @unchecked, `passedEnd`) => (l, thatElem)
8+
case t: (A, U) @unchecked => t // false-positive warning
9+
}
10+
}

0 commit comments

Comments
 (0)