We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94161d0 commit bedbbe4Copy full SHA for bedbbe4
2 files changed
langs/outlaw/compile-expr.rkt
@@ -340,7 +340,7 @@
340
cm2))])])]
341
[(PStruct n ps)
342
(match (compile-struct-patterns ps c g (cons #f cm) next 1)
343
- [(list i f cm)
+ [(list i f cm1)
344
(let ((fail (gensym)))
345
(list
346
(seq (Mov r8 rax)
@@ -358,7 +358,7 @@
358
(Label fail)
359
(Add rsp (*8 (length cm)))
360
(Jmp next))
361
- cm))])]
+ cm1))])]
362
363
[(PPred e)
364
(let ((fail (gensym 'fail)))
langs/outlaw/test/test-runner.rkt
@@ -604,6 +604,12 @@
604
(check-equal? (run '(let ((x 1)) x x x)) 1)
605
(check-equal? (run '(match 1 [1 2 3])) 3)
606
(check-equal? (run '(system-type)) (system-type))
607
+ (check-equal? (run '(struct Foo (x))
608
+ '(struct Bar (y))
609
+ '(match (Bar 1)
610
+ [(Foo x) #f]
611
+ [(Bar x) x]))
612
+ 1)
613
)
614
615
0 commit comments