Closed
Description
Compiler version
3.1.0
Minimized code
import scala.compiletime.{error, codeOf}
import scala.compiletime.testing.*
inline def testError(inline typeName: Any): String = error("Got error " + codeOf(typeName))
transparent inline def compileErrors(inline code: String): List[Error] = typeCheckErrors(code)
typeCheckErrors("""testError("string")""")
compileErrors("""testError("string")""")
Output
-- Error:
9 |compileErrors("""testError("string")""")
|^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|Got error "string"
Expectation
Code should compile.
Related to scalameta/munit#453