summaryrefslogtreecommitdiff
path: root/macros/src/main/scala
diff options
context:
space:
mode:
authormergify[bot]2022-06-08 01:29:53 +0000
committerGitHub2022-06-08 01:29:53 +0000
commit9c79051866743ba5b8f922fc309abc1302ba5547 (patch)
tree39179f1872aa14cccd3d5bbb18a9d58d683f68a4 /macros/src/main/scala
parent205d8bb34b2ac2acaef6d318a4f9e3aee181110e (diff)
Enhance suggestion in literal extract warning (#2569) (#2570)
Include the function being called in the suggestion. (cherry picked from commit 296623f6f41eb9f54899277621902679bb6b497c) Co-authored-by: Jack Koenig <koenig@sifive.com>
Diffstat (limited to 'macros/src/main/scala')
-rw-r--r--macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala b/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala
index d77e4f1e..d772fd8b 100644
--- a/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala
+++ b/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala
@@ -268,7 +268,7 @@ class IntLiteralApplyTransform(val c: Context) extends AutoSourceTransform {
val msg =
s"""Passing an Int to .$func is usually a mistake: It does *not* set the width but does a bit extract.
|Did you mean .$func($arg.W)?
- |If you do want bit extraction, use .extract($arg) instead
+ |If you do want bit extraction, use .$func.extract($arg) instead.
|""".stripMargin
c.warning(c.enclosingPosition, msg)
}