jackfirth / racket-mock

Mocking library for Racket
Other
22 stars 7 forks source link

`with-mocks` throws a horrendous error when given unexpected identifier #100

Closed jackfirth closed 7 years ago

jackfirth commented 8 years ago

This program:

#lang racket
(require mock)
(define (foo) #f)
(with-mocks foo
  (void))

Throws this error:

Library/Racket/6.6/pkgs/mock/private/syntax.rkt:23:2: syntax-local-value/immediate: not defined as syntax
  identifier: #<syntax:4:12 foo>

This is objectively awful. Worse, it doesn't even point to the foo identifier usage in with-mocks as the source of the problem!

jackfirth commented 7 years ago

Closed by #108