Skip to content

Commit

Permalink
Fix scala 2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
TonioGela committed Jul 5, 2024
1 parent de8ae42 commit 803502d
Showing 1 changed file with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,17 @@ class EitherSyntax extends SemanticRule("TypelevelEitherSyntax") {
docContainsImports = true
case expr @ Term.Apply.After_4_6_0(Term.Name("Right"), Term.ArgClause(List(Lit.Unit()), _)) =>
if (!docContainsImports)
patches.addOne(
Patch.addGlobalImport(
Importer(
Term.Select(
Term.Select(Term.Name("cats"), Term.Name("syntax")),
Term.Name("either")
),
List(Importee.Wildcard())
)
patches += Patch.addGlobalImport(
Importer(
Term.Select(
Term.Select(Term.Name("cats"), Term.Name("syntax")),
Term.Name("either")
),
List(Importee.Wildcard())
)
)
patches.addOne(Patch.replaceTree(expr, "Either.unit"))

patches += Patch.replaceTree(expr, "Either.unit")
}

patches.asPatch
Expand Down

0 comments on commit 803502d

Please sign in to comment.