- Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:experimental:ccCapture checking relatedCapture checking relatedarea:libraryStandard libraryStandard libraryitype: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 trace4cats/trace4cats-opentelemetry
- build logs
Same kind of errors also found in 3 other projects
Compiler version
Last good release: 3.8.0-RC1-bin-20250822-658c8bd-NIGHTLY
First bad release: 3.8.0-RC1-bin-20250823-712d5bc-NIGHTLY
Bisect points to 712d5bc (unlikely, rather related to usage of new Scala stdlib instead)
Minimized code
trait AttributeValue case class CompletedSpan( name: String, // remove to make it compile attributes: Map[String, AttributeValue], ){ lazy val allAttributes: Map[String, AttributeValue] = attributes } def Test = val span: CompletedSpan = ??? span.copy(attributes = span.allAttributes.filterNot { _ => false })
Output
Should compile
Error: (span.allAttributes : Map[String, AttributeValue]) is not a legal path since it refers to nonfinal lazy value allAttributes Error compiling project (Scala 3.8.0-RC1-bin-20250928-b67fcf2-NIGHTLY, JVM (21))
Expectation
Metadata
Metadata
Assignees
Labels
area:experimental:ccCapture checking relatedCapture checking relatedarea:libraryStandard libraryStandard libraryitype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore