-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label
Description
Compiler version
3.8.1-RC1-bin-20251209-07883c1-NIGHTLY
Minimized code
import scala.compiletime.ops.int.+
import scala.compiletime.ops.int.S
object test {
object O {
opaque type O = Int
transparent inline def v: O = 123
}
val a: 123 & O.O = O.v
val b: S[a.type] = 124 // works
val c: a.type + 1 = 124 // error
}Output
Compiling project (Scala 3.8.1-RC1-bin-20251209-07883c1-NIGHTLY, JVM (21))
[error] ./refined.scala:12:23
[error] Found: (124 : Int)
[error] Required: (test.a : (123 : Int) & test.O.O) + (1 : Int)
[error] val c: a.type + 1 = 124
[error] ^^^
Error compiling project (Scala 3.8.1-RC1-bin-20251209-07883c1-NIGHTLY, JVM (21))
Compilation failedExpectation
Code should compile without errors.
Metadata
Metadata
Assignees
Labels
itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label