Closed Lasering closed 2 years ago
3.1.0
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")""")
Scastie Link
-- Error: 9 |compileErrors("""testError("string")""") |^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |Got error "string"
Code should compile.
Related to https://github.com/scalameta/munit/issues/453
This currently compiles but fails -Ycheck
-Ycheck
Compiler version
3.1.0
Minimized code
Scastie Link
Output
Expectation
Code should compile.
Related to https://github.com/scalameta/munit/issues/453