-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:metaprogramming:quotesIssues related to quotes and splicesIssues related to quotes and splicesarea:nullabilityarea:private optionsIssues tied to -Y private/internal compiler settings.Issues tied to -Y private/internal compiler settings.itype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore
Description
Based on OpenCB failure in https://github.com/tabdulradi/nullable - OpenCB logs
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 pointed to 712d5bc but it does not make sense - this change was not touching the compiler.
Minimized code
//> using options -Yexplicit-nulls
import scala.quoted.*
private def typeNameMacro[A: Type](using Quotes) = Expr(Type.show[A])
transparent inline def typeName[A]: String = ${typeNameMacro[A]}
Output
-- [E007] Type Mismatch Error: /Users/wmazur/projects/scala/community-build3/example.scala:4:47 ---------------------------------------------------------------------------------------------
4 |transparent inline def typeName[A]: String = ${typeNameMacro[A]}
| ^^^^^^^^^^^^^^^^
| Found: (scala.quoted.Type[A], scala.quoted.Quotes) ?=> (scala.quoted.Expr[(String)?])?
| Required: (((scala.quoted.Quotes)?) ?=> (scala.quoted.Expr[(String)?])?)?
|
| longer explanation available when compiling with `-explain`
Expectation
Should compile
Metadata
Metadata
Labels
area:metaprogramming:quotesIssues related to quotes and splicesIssues related to quotes and splicesarea:nullabilityarea:private optionsIssues tied to -Y private/internal compiler settings.Issues tied to -Y private/internal compiler settings.itype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore