-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix issues with using
being added erroneously
#31
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Looks good to me, leaving merging to @ingarabr
There's one more bug I'm going to try to address here, where the For example, this code: def test(using i: Int): String => String = s => s
given i: Int = 1
test("") is rewritten to: def test(using i: Int): String => String = s => s
given i: Int = 1
// Note the `using` keyword is added here but results in a compile error
test(using "") |
using
keywordsusing
being added erroneously
Fixed that bug and updated the PR title and description to match |
Looks good to me. Thank you for updating dependencies and deprecated code. Much appreciated :) |
Fixes #30
It turned out this was only an issue on later scalafix/scalameta versions, so I had to upgrade dependencies to actually reproduce and fix it.
The commit with the actual fix is mrdziuban@c6be468.
The other changes were to address things related to the scalafix upgrade:
templ.body.children
in theSemiAuto
rule instead of justtempl.children
templ.children
returned all the statements within the template, but now it just returns aList
with one element -- the template's body -- so we need to look at the children of the bodyEDIT:
This also fixes an issue where
using
is added to code that's calling a function returned by a method that takesusing
parameters. See example code in #31 (comment)