Closed
Description
Based on Open CB failure found in ichoran/kse3
- build logs
Compiler version
Last good release: 3.5.1-RC1-bin-20240611-e2dfea3-NIGHTLY
First bad release: 3.5.1-RC1-bin-20240612-5cfcfa8-NIGHTLY
Affects 3.5.1-RC1
Bisect points to 4443395
Minimized code
import java.util.concurrent.atomic.AtomicReference
opaque type Worm[V] = AtomicReference[AnyRef]
object Worm:
extension [V](worm: Worm[V])
def wormAsAtomic: AtomicReference[AnyRef] = worm
def get: V = worm.wormAsAtomic.get().asInstanceOf[V]
def get2: V = get
Output
[error] ./bisect/test.scala:10:19
[error] Found: AnyRef
[error] Required: V
[error] def get2: V = get
[error] ^^^
Expectation
Should compile, get
result should be V
instead of AnyRef