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
FBounded Polymorphism and shouldNot compile
giving a false positive
#2252
Comments
@dhinojosa Hmm, fyi ScalaTest macro for Scala 3 just use scala.compiletime.testing.typeChecks to check that the given code does not compile, I wonder if typeChecks does not cover the compiler phase that perform the check for the given expected error above. @liufengyun Do you have any idea if that is the case? |
Sorry for the late response. I checked the compiler code implementation of I'd suggest create a minimized test without ScalaTest by using |
@dhinojosa @liufengyun This is an example without scalatest:
@dhinojosa Would you like to report it to dotty issues? |
@cheeseng That last line will always fail since it is |
Oh, wait, even if I place the result, this should actually |
Filed: scala/scala3#18150 |
Given the following production code:
Given the test:
In the above, if you uncomment the
class Banana
block you will find that the code block will not compile which is correct. But, when theshouldNot compile
code is run with the same block it errors with the following error messageThe text was updated successfully, but these errors were encountered: