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

Typechecker tests for variable shadowing #330

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/fail-typecheck/shadow-global.egg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(datatype MySort
(Wrap i64))

(let a (Wrap 1))
(let a (Wrap 2))
8 changes: 8 additions & 0 deletions tests/fail-typecheck/shadow-local-global.egg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(datatype MySort
(Wrap i64))

(let a (Wrap 1))


(rule ((Wrap 1))
((let a (Wrap 1))))
7 changes: 7 additions & 0 deletions tests/fail-typecheck/shadow-local.egg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(datatype MySort
(Wrap i64))


(rule ((Wrap 1))
((let z (Wrap 2))
(let z (Wrap 2))))
4 changes: 4 additions & 0 deletions tests/shadow-global-constructor.egg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(datatype MySort
(Wrap i64))

(let Wrap 3)
6 changes: 6 additions & 0 deletions tests/shadow-local-constructor.egg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(datatype MySort
(Wrap i64))


(rule ((Wrap 1))
((let Wrap 2)))
Loading