Skip to content

Commit d011b44

Browse files
authored
Add type ascription to implicits from instantiable (#3615)
This fixes Scala compiler warnings in Scala 2.13.12 requiring type ascriptions on public implicit definitions.
1 parent b03685f commit d011b44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

macros/src/main/scala/chisel3/internal/InstantiableMacro.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ private[chisel3] object instantiableMacro {
1212
import c.universe._
1313
def processBody(stats: Seq[Tree]): (Seq[Tree], Iterable[Tree]) = {
1414
val extensions = scala.collection.mutable.ArrayBuffer.empty[Tree]
15-
extensions += q"implicit val mg = new chisel3.internal.MacroGenerated{}"
15+
extensions += q"implicit val mg: chisel3.internal.MacroGenerated = new chisel3.internal.MacroGenerated {}"
1616
// Note the triple `_` prefixing `module` is to avoid conflicts if a user marks a 'val module'
1717
// with @public; in this case, the lookup code is ambiguous between the generated `def module`
1818
// function and the argument to the generated implicit class.

0 commit comments

Comments
 (0)