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

Type checking allows incorrect match term #734

Closed
developedby opened this issue Oct 22, 2024 · 0 comments · Fixed by #735
Closed

Type checking allows incorrect match term #734

developedby opened this issue Oct 22, 2024 · 0 comments · Fixed by #735

Comments

@developedby
Copy link
Member

Reproducing the behavior

The following program type-checks when it shouldn't

type Nat_:
  Zero
  Succ {x: Unit, pred: Nat_}

type Unit:
  Unit

Test1: Nat_ -> (Nat_, Nat_)
Test1 = λx match x {
  Nat_/Zero: (Nat_/Zero, Nat_/Zero)
  Nat_/Succ: (x.x, x.pred)
}

main = *

We expected a "can't unify (Unit, Nat_) with (Nat_, Nat_)" error.

System Settings

Bend commit 71fb680

Additional context

No response

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

Successfully merging a pull request may close this issue.

1 participant