Skip to content

Commit

Permalink
Add type ascription to implicits from instantiable (#3615)
Browse files Browse the repository at this point in the history
This fixes Scala compiler warnings in Scala 2.13.12 requiring type
ascriptions on public implicit definitions.
  • Loading branch information
jackkoenig authored Nov 2, 2023
1 parent b03685f commit d011b44
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ private[chisel3] object instantiableMacro {
import c.universe._
def processBody(stats: Seq[Tree]): (Seq[Tree], Iterable[Tree]) = {
val extensions = scala.collection.mutable.ArrayBuffer.empty[Tree]
extensions += q"implicit val mg = new chisel3.internal.MacroGenerated{}"
extensions += q"implicit val mg: chisel3.internal.MacroGenerated = new chisel3.internal.MacroGenerated {}"
// Note the triple `_` prefixing `module` is to avoid conflicts if a user marks a 'val module'
// with @public; in this case, the lookup code is ambiguous between the generated `def module`
// function and the argument to the generated implicit class.
Expand Down

0 comments on commit d011b44

Please sign in to comment.