chisel
chisel copied to clipboard
(draft) Change signature of macro-based `chisel3.Bits.unary_~` to fix IntelliJ highlighting issue
Hello, I am from the IntelliJ Scala Plugin team
We have an error report about ~ method not being resolved in IntelliJ with Scala Plugin:
https://youtrack.jetbrains.com/issue/SCL-15350/Operators-not-recognized-chisel3-library
The method is macro-based.
It declares to return Bits, but the macro substitutes it with UInt/ Boolean / SInt.
IntelliJ can't detect it because it knows nothing of the macro logic.
As I mentioned in the comment
There is a chance that this particular issue could be partially fixed by improving the method return type to use abstract type type Self <: Bits.
JFTR I know nothing about chisel details It's a draft proposal, more for a discussion initiation...