Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Desugarer should not throw IllegalArgumentException #471

Closed
konnov opened this issue Jan 22, 2021 · 1 comment
Closed

[FEATURE] Desugarer should not throw IllegalArgumentException #471

konnov opened this issue Jan 22, 2021 · 1 comment
Assignees
Labels
bug usability UX improvements

Comments

@konnov
Copy link
Collaborator

konnov commented Jan 22, 2021

Surfaced in #469. Desugarer should throw an error that is processed via the normal error processing.

 private def flattenTuples(ex: TlaEx): Seq[TlaEx] = ex match {
    case OperEx(TlaFunOper.tuple, args @ _*) =>
      args.map(flattenTuples).reduce(_ ++ _)

    case NameEx(_) =>
      Seq(ex)

    case _ =>
      throw new IllegalArgumentException("Expected a variable or a tuple of variables, found: " + ex)
  }
@konnov konnov added new New issue to be triaged. usability UX improvements labels Jan 22, 2021
@konnov konnov added this to the January iteration milestone Jan 22, 2021
@konnov konnov self-assigned this Jan 22, 2021
@konnov konnov added bug and removed new New issue to be triaged. labels Jan 23, 2021
@konnov
Copy link
Collaborator Author

konnov commented Jan 23, 2021

We should process the default case as e' = e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug usability UX improvements
Projects
None yet
Development

No branches or pull requests

1 participant