Skip to content
This repository has been archived by the owner on Mar 25, 2018. It is now read-only.

Stack overflow in FSM #88

Open
vsuharnikov opened this issue Jun 22, 2016 · 0 comments
Open

Stack overflow in FSM #88

vsuharnikov opened this issue Jun 22, 2016 · 0 comments

Comments

@vsuharnikov
Copy link
Contributor

We can obtain "-1" by incrementing an int value, proof:

val x = Int.MaxValue
x + Int.MaxValue + 1 // prints "-1"

But if we try to do this via FSM:

import moorka._

def fsm = FSM(0) {
  case -1  Dummy
  case x  Val(x + 1)
}

We will get:

java.lang.StackOverflowError
at moorka.rx.bindings.package$.bindingStack(scratch_26.scala:9)
at moorka.rx.bindings.Binding$class.withContext(scratch_26.scala:10)
at moorka.rx.FSM.withContext(scratch_26.scala:15)

  • Moorka 0.7.1
  • Scala.JS 0.6.10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant