Skip to content

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

Open

Description

@stchang

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

Activity

  1. assigned and unassigned on Mar 29, 2018
  2. stchang commented on Mar 29, 2018

    @stchang
    OwnerAuthor

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

  3. stchang commented on Feb 14, 2020

    @stchang
    OwnerAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions