Fix ShiftRegister with 0 delay. (#1903) (#1959)
* Add test to check ShiftRegister(s) with delay is 0.
This should break ShiftRegister(x, 0) since last is not exist in a empty
Seq. Originally, test only test 1 to 4, which missed a potential bug
from #1723.
* Fix ShiftRegister with 0 delay.
if ShiftRegisters is empty, java will complain:
```
java.util.NoSuchElementException
scala.collection.LinearSeqOptimized.last(LinearSeqOptimized.scala:150)
```
This fix this issue and return `in` directly when ShiftRegister size is 0.
Co-authored-by:
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by:
Jiuyang Liu <liu@jiuyang.me>
Co-authored-by:
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
2a2634af
Please register or sign in to comment