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
java.lang.UnsupportedOperationException: Position.start on NoPosition #12453
Comments
I get a normal error as expected: % scalac -version
Scala compiler version 2.13.6 -- Copyright 2002-2021, LAMP/EPFL and Lightbend, Inc.
% scalac S.scala
S.scala:4: error: Illegal literal type (), use Unit instead
val foo = Foo[IO[()]]
^
1 error |
Hmmm... odd. I'll investigate some more. |
OK. I've confirmed that if I do this in a clean project (defining IO as trait IO[_]), I get a compiler error. I'll try to determine why I'm getting the stack trace in my real project... |
Note I thought Dotty says
Maybe the underlying issue has to do with incremental compilation and case companions, just a guess. |
@lancewalton did you have a chance to get back to this? |
No, sorry. I never got a chance to investigate. |
reproduction steps
using Scala 2.13.6
problem
The problem is that () is a value, not a type. the val line should say:
So it was my dodgy code that caused the problem to exhibit. But I'd expect the compiler to issue an error, not throw an Exception.
The text was updated successfully, but these errors were encountered: