-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:libraryStandard libraryStandard libraryarea:nullabilityarea:opaque-typesitype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore
Description
Based on the OpenCB failure in shuwariafrica/world - Open CB logs
Compiler version
Last good release: 3.8.0-RC1-bin-20251011-be16a7b-NIGHTLY
First bad release: 3.8.0-RC1-bin-20251012-89e617d-NIGHTLY
Bisect points to 89e617d
Minimized code
//> using options -Yexplicit-nulls
opaque type CurrencyValue = BigDecimal
extension (value: CurrencyValue)
def negate: CurrencyValue = value.bigDecimal.negate().nnOutput
scala compile test.macro.scala -S 3.nightly
Compiling project (Scala 3.8.1-RC1-bin-20251130-2953eab-NIGHTLY, JVM (21))
[error] ./test.macro.scala:7:5
[error] value nn is not a member of (java.math.BigDecimal)?.
[error] An extension method was tried, but could not be fully constructed:
[error]
[error] nn[(java.math.BigDecimal)?](value.bigDecimal.negate())
[error]
[error] failed with:
[error]
[error] Found: (?1 : (java.math.BigDecimal)?)
[error] Required: CurrencyValue
[error]
[error] where: ?1 is an unknown value of type (java.math.BigDecimal)?
[error]
[error] value.bigDecimal.negate().nn
[error] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error compiling project (Scala 3.8.1-RC1-bin-20251130-2953eab-NIGHTLY, JVM (21))Expectation
Should compile
Metadata
Metadata
Assignees
Labels
area:libraryStandard libraryStandard libraryarea:nullabilityarea:opaque-typesitype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore