diff options
| author | mergify[bot] | 2022-04-25 18:39:41 +0000 |
|---|---|---|
| committer | GitHub | 2022-04-25 18:39:41 +0000 |
| commit | 5a90f27ab1311994b4df73a85cd0facab3ae0b3a (patch) | |
| tree | 491c1dd2cb851d39eed89f1e8032b10eef129ee9 /macros/src/main/scala | |
| parent | a16a8a52a3b2d72d80a27434217aaeba7be2d3a8 (diff) | |
Fix warning injected into user code by @chiselName (#2500) (#2503)
In Scala 2.13, Auto-application to `()` is deprecated. Any nullary
method (ie. a method with no arguments) that is defined with () must now
be called with (). @chiselName used to inject a case of this warning
into user code which would then cause a warning on the @chiselName macro
that the user has no way to fix.
(cherry picked from commit ca902680df772445371e6c3dd907c01113afb1f5)
Co-authored-by: Jack Koenig <koenig@sifive.com>
Diffstat (limited to 'macros/src/main/scala')
| -rw-r--r-- | macros/src/main/scala/chisel3/internal/naming/NamingAnnotations.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/macros/src/main/scala/chisel3/internal/naming/NamingAnnotations.scala b/macros/src/main/scala/chisel3/internal/naming/NamingAnnotations.scala index 82223d78..b12826fc 100644 --- a/macros/src/main/scala/chisel3/internal/naming/NamingAnnotations.scala +++ b/macros/src/main/scala/chisel3/internal/naming/NamingAnnotations.scala @@ -125,7 +125,7 @@ class NamingTransforms(val c: Context) { q""" val $contextVar = $globalNamingStack.pushContext() ..$transformedBody - if($globalNamingStack.length == 1){ + if($globalNamingStack.length() == 1){ $contextVar.namePrefix("") } $globalNamingStack.popReturnContext(this, $contextVar) |
