Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Construction of child model inside constructor of parent model causes failure #39

Open
cyrille-artho opened this issue Feb 25, 2019 · 1 comment
Labels
good first issue Good for newcomers

Comments

@cyrille-artho
Copy link
Owner

When a child model is created inside the constructor of the parent, the sets of transitions of the models get mixed up. Example:

  class LaunchFail extends Model {
    val child = new LaunchFailChild()
    "parent-init" -> "parent-main" := {
      launch(child)
    }
    "parent-main" -> "parent-end" := {
    }
  }
@cyrille-artho
Copy link
Owner Author

Creation of child models could be potentially nested, so it is better to document that this is not allowed. Perhaps this can be discovered at run-time later on, and result in Modbat aborting.

@cyrille-artho cyrille-artho added the good first issue Good for newcomers label Mar 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant