It seems to me that the Iterator design pattern should deliver a fatal error if it receives a next()
command when hasnext()
returns false. At least that's how I've implemented it in my SystemVerilog code.
Does a fatal error from an Iterator in this case violate some expectation of Iterator behavior?
Aucun commentaire:
Enregistrer un commentaire