-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve the check for use of extension methods
- Loading branch information
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
scalafix/v2_2_0/input/src/main/scala/fix/v2_2_0/RemoveInstanceImports3.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
rule = "scala:fix.v2_2_0.RemoveInstanceImports" | ||
*/ | ||
package fix | ||
package to2_2_0 | ||
|
||
import cats._ | ||
import cats.implicits._ | ||
|
||
object RemoveInstanceImportsTests3 { | ||
|
||
def doSomethingMonadic[F[_]: Monad](x: F[Int]): F[String] = | ||
for { | ||
a <- x | ||
b <- Monad[F].pure("hi") | ||
c <- Monad[F].pure("hey") | ||
} yield a.toString + b + c | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
scalafix/v2_2_0/output/src/main/scala/fix/v2_2_0/RemoveInstanceImports3.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package fix | ||
package to2_2_0 | ||
|
||
import cats._ | ||
import cats.syntax.all._ | ||
|
||
object RemoveInstanceImportsTests3 { | ||
|
||
def doSomethingMonadic[F[_]: Monad](x: F[Int]): F[String] = | ||
for { | ||
a <- x | ||
b <- Monad[F].pure("hi") | ||
c <- Monad[F].pure("hey") | ||
} yield a.toString + b + c | ||
|
||
} |