Skip to content

result arity error from prompt-tag/c with call/cc #5534

Description

@samth

On 9.2.0.5, the following program:

#lang racket/base
(require racket/contract)

(define/contract tag
  (prompt-tag/c any/c)            
  (make-continuation-prompt-tag))

(define k #f)
(call-with-continuation-prompt
 (lambda () (call/cc (lambda (c) (set! k c) 0) tag))
 tag)

(call-with-continuation-prompt
 (lambda () (k 5))
 tag)

produces this error (note that it references the call/cc result guard, which isn't present in the actual prompt-tag/c use):

result arity mismatch;
 expected number of values not received
  expected: 1
  received: 1
  at: use of `call/cc` result guard
  arguments...:
   '()

Activity

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

    component: contractthe contract system: combinators, attachment forms, semantics, implementation, optimization

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions