Skip to content

Commit

Permalink
only add adhoc extension import under scala 3
Browse files Browse the repository at this point in the history
  • Loading branch information
ngbinh authored and thesamet committed Sep 18, 2023
1 parent 079f301 commit d3540ba
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,7 @@ class ProtobufGenerator(
.when(javaConverterImport)(
_.add("import _root_.scalapb.internal.compat.JavaConverters._").add()
)
.when(params.lenses)(
.when(params.lenses && params.scala3Sources)(
_.add("import scala.language.adhocExtensions").add()
)
.print(file.scalaOptions.getImportList.asScala) { case (printer, i) =>
Expand Down

0 comments on commit d3540ba

Please sign in to comment.