-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Wrapped typeCheckErrors is emitting compilation errors #12656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@nicolasstucki I want to try and tackle this, since there is no easy workaround and I'm currently avoiding creating tests because of this. Any suggestion where to begin? |
This test should catch what we need transparent inline def expectCompileError(
inline code: String,
expectedMsg: String
) =
val errors = compiletime.testing.typeCheckErrors(code)
assert(errors.head.message == expectedMsg, (errors.head.message, expectedMsg))
@main def Test = expectCompileError("""compiletime.error("some error")""", "some error") We process |
Fix #12656 by setting the proper reporter for inlined methods
The
typeCheckErrors
when used inside another definition does not trap the error messages.Affects munit.
Compiler version
v3.0.0 (also tested on nightly)
Minimized code
Output
error: some error
Expectation
No compilation error (the error should be trapped)
The text was updated successfully, but these errors were encountered: