Closed GoogleCodeExporter closed 9 years ago
I suppose that fix is merely:
private def resetIfMemoVersionHasIncremented =
if (memoVersion != MemoState.MEMO_VERSION) {
memoVersion = MemoState.MEMO_VERSION
memo.clear
}
def hasBeenComputedAt (t : T) : Boolean = {
resetIfMemoVersionHasIncremented
// this is simpler btw :-)
memo.get (t).isDefined
}
Original comment by etorrebo...@gmail.com
on 5 Mar 2013 at 2:27
Thanks for the report. Fixed in r22fa69649631.
BTW, the isDefined trick doesn't work here because it's a Java IdentityHashMap,
not a Scala one. I have simplified the check to != null, though...
Original comment by inkytonik
on 5 Mar 2013 at 4:44
I confirm that everything works fine. Thanks Tony.
Original comment by etorrebo...@gmail.com
on 7 Mar 2013 at 3:54
Thanks for the ack Eric.
Original comment by inkytonik
on 7 Mar 2013 at 8:36
Original issue reported on code.google.com by
etorrebo...@gmail.com
on 5 Mar 2013 at 2:23