-
Notifications
You must be signed in to change notification settings - Fork 186
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
Explicit result breaks when using this.type
.
#1631
Comments
Actually hold on. Running this will |
Thanks for reporting! I guess there is something fishy in scalafix/scalafix-rules/src/main/scala-2/scalafix/internal/rule/CompilerTypePrinter.scala Lines 299 to 389 in 449a06a
Probably related to #1534? |
This might be an issue with mill-scalafix: joan38/mill-scalafix#174 |
I encountered this when writing a Mill plugin. When creating an
ExternalModule
you'll have code that looks like this:If you run scalafix against this wanting
ExplicitResultTypes
you'll end up with broken code since the finallazy vall millDiscover
will turn into:Which will error with:
I'd expect running this rule not to break my code.
You can reproduce this with the Scala file up above placed in a
foo/src/Example.scala
and the following files:Then you can either run them
via Mill orMetals.The text was updated successfully, but these errors were encountered: