Closed
Description
Compiler version
3.3.4
Minimized code
//> using scala 3.3.4
//> using option -Xcheck-macros
//> using test.dep org.scalameta::munit:1.0.2
object Repro {
inline def apply(): Unit = ${ applyImpl }
import scala.quoted.*
def applyImpl(using q: Quotes): Expr[Unit] = {
import q.*, q.reflect.*
report.info(TypeRepr.of[Some[String]].typeSymbol.pos.toString)
'{ () }
}
}
class Test extends munit.FunSuite {
test("sdfsdf") {
Repro()
}
}
Output
[warn] ./test.test.scala:4:5
[warn] Missing symbol position (defaulting to position 0): class Some
[warn] This is a compiler bug. Please report it.
[warn] Repro()
[warn] ^^^^^^^
Expectation
No warning.
This might be troublesome for macro libraries with -Xcheck-macros
and -Xfatal-warnings
.
The bug might be older than 3.3.4, since 3.3.4 just added the check, 3.3.3 might have the same issue but there was no check for it.