This code:

    (define (foo) (values 'a 'b))
    (let ([x (foo)]) x)

highlights the expression (values 'a 'b) and produces the error message:

    context expected 1 value, received 2 values: a b

The highlighted expression was the producer, but the message was about the context. This confused me when it happened to me, because I assumed the highlighted expression /was/ the context, and set about hopelessly trying to figure out what *inside* that expression had produced the wrong number of values.

This is one of those "two parties disagree but there's no expressed contract" kinds of errors, so highlighting either party is reasonable, but the error message should probably be consistent with what's highlighted in order to avoid this confusion.

Thanks,
Dave
_________________________________________________
 For list-related administrative tasks:
 http://list.cs.brown.edu/mailman/listinfo/plt-dev

Reply via email to