Skip to content

Commit 8ac219d

Browse files
committed
Fix test for decompilation
Otherwise the typer will infer the type `wr.underlying.T`, which is not valid in source: val x: wr.underlying.T = wr.underlying.get()
1 parent 12fcc8b commit 8ac219d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/pos/i1793.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
object Test {
22
import scala.ref.WeakReference
33
def unapply[T <: AnyRef](wr: WeakReference[T]): Option[T] = {
4-
val x = wr.underlying.get
4+
val x: T = wr.underlying.get
55
if (x != null) Some(x) else None
66
}
77
}

0 commit comments

Comments
 (0)