diff options
| author | mergify[bot] | 2022-06-07 23:11:54 +0000 |
|---|---|---|
| committer | GitHub | 2022-06-07 23:11:54 +0000 |
| commit | 205d8bb34b2ac2acaef6d318a4f9e3aee181110e (patch) | |
| tree | 042b01ec82a9f723cdf0215ef5ba78b1631459a3 /macros/src/main/scala | |
| parent | 42f5d89045e7db323670964a982c59319cf9001f (diff) | |
Add single argument Bits.extract (#2566) (#2568)
(cherry picked from commit 255c56c3955a8c16191a6751e7d547cfcfd96705)
Co-authored-by: Jared Barocsi <82000041+jared-barocsi@users.noreply.github.com>
Diffstat (limited to 'macros/src/main/scala')
| -rw-r--r-- | macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala | 2 |
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 6c83da00..d77e4f1e 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 want to hide this message, assign .$func to a val first, then invoke .apply($arg) + |If you do want bit extraction, use .extract($arg) instead |""".stripMargin c.warning(c.enclosingPosition, msg) } |
