Skip to content

Commit

Permalink
Fix warning injected into user code by @chiselName (#2500)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jackkoenig authored Apr 25, 2022
1 parent 6975f77 commit ca90268
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ca90268

Please sign in to comment.