test: add match given-away value error test (#1351)

This commit is contained in:
Lucas Leblow 2021-10-28 02:18:38 -06:00 committed by GitHub
parent c471fcce89
commit 4e02c452dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1 @@
match-given-away-value.carp:9:16 Referencing a given-away value 'e'.

View File

@ -0,0 +1,9 @@
(Project.config "file-path-print-length" "short")
(deftype Example (A [String String]))
(defn f []
(let-do [e (Example.A @"x" @"y")]
(match e
(Example.A a b) ())
(println* &e)))