X-Git-Url: https://git.lukelau.me/?p=scheme.git;a=blobdiff_plain;f=tests.scm;h=6dfbd9f4459cc1e46b3258caab6d5c0ba0ff2e27;hp=fa5b195e1b2575c4d14f9e385c854aad53dd0823;hb=e4dc23d659849c88cec8c7e57d0d463f9493850e;hpb=9fd836fa6cbc686d277684101319f835d55fc5b3 diff --git a/tests.scm b/tests.scm index fa5b195..6dfbd9f 100644 --- a/tests.scm +++ b/tests.scm @@ -155,9 +155,7 @@ (test-types (typecheck - '((data A - [foo Int] - [bar Bool]) + '((data A [foo Int]) (let ([x (foo 42)] [(foo y) x]) x))) @@ -165,9 +163,7 @@ (test-types (typecheck - '((data A - [foo Int] - [bar Bool]) + '((data A [foo Int]) (let ([x (foo 42)] [(foo y) x]) y))) @@ -259,3 +255,8 @@ (let ([(foo x y) (foo (= 3 3) 42)]) y)) 42) + +(test-exception (expand-pattern-matches + '((data A [foo Int] + [bar Bool]) + (let ([(foo x) (foo 0)]) x))))