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

can't figure out this "bad syntax" #58

Open
stchang opened this issue Mar 29, 2018 · 2 comments
Open

can't figure out this "bad syntax" #58

stchang opened this issue Mar 29, 2018 · 2 comments

Comments

@stchang
Copy link
Owner

stchang commented Mar 29, 2018

Removing the ~parse here changes the error produced by these tests from a legitimate error to "bad syntax". Why?

@stchang stchang assigned stchang and unassigned stchang Mar 29, 2018
@stchang
Copy link
Owner Author

stchang commented Mar 29, 2018

To clarify, the change is removing the outer (~parse .... (get-orig #'e-tmp)), but leaving the inner (~post ....) pattern.

@stchang
Copy link
Owner Author

stchang commented Feb 14, 2020

updated links:

(~parse
(~post
(~fail #:when (and (not (check? #'τ-tmp #'τ-exp))
(get-orig #'e-tmp))
(typecheck-fail-msg/1 #'τ-exp #'τ-tmp #'e-tmp)))
(get-orig #'e-tmp)))])

(typecheck-fail
(ann (letrec ([(x : Int) #f] [(y : Int) 1]) y) : Int)
#:with-msg
"letrec: type mismatch: expected Int, given Bool\n *expression: #f")
(typecheck-fail
(ann (letrec ([(y : Int) 1] [(x : Int) #f]) x) : Int)
#:with-msg
"letrec: type mismatch: expected Int, given Bool\n *expression: #f")

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

No branches or pull requests

1 participant