Fixes check syntax bug
This commit is contained in:
parent
a0f2db7574
commit
72059c908b
|
@ -1228,6 +1228,7 @@
|
||||||
(when ed
|
(when ed
|
||||||
(define pos (syntax-position var))
|
(define pos (syntax-position var))
|
||||||
(define span (syntax-span var))
|
(define span (syntax-span var))
|
||||||
|
(when (and pos span)
|
||||||
(define start (- pos 1))
|
(define start (- pos 1))
|
||||||
(define fin (+ start span))
|
(define fin (+ start span))
|
||||||
(define loc (list ed start fin))
|
(define loc (list ed start fin))
|
||||||
|
@ -1235,7 +1236,7 @@
|
||||||
id-to-sets
|
id-to-sets
|
||||||
var
|
var
|
||||||
(set-add (module-identifier-mapping-get id-to-sets var set)
|
(set-add (module-identifier-mapping-get id-to-sets var set)
|
||||||
loc)))))))
|
loc))))))))
|
||||||
(module-identifier-mapping-for-each
|
(module-identifier-mapping-for-each
|
||||||
id-to-sets
|
id-to-sets
|
||||||
(λ (id locs)
|
(λ (id locs)
|
||||||
|
|
|
@ -66,3 +66,24 @@
|
||||||
(let ([y 1]) y)))))))
|
(let ([y 1]) y)))))))
|
||||||
(done))
|
(done))
|
||||||
add-arrow-called?))
|
add-arrow-called?))
|
||||||
|
|
||||||
|
(check-not-exn
|
||||||
|
(λ ()
|
||||||
|
(define annotations
|
||||||
|
(new (class (annotations-mixin object%)
|
||||||
|
(super-new)
|
||||||
|
(define/override (syncheck:find-source-object stx)
|
||||||
|
stx))))
|
||||||
|
|
||||||
|
(define base-namespace (make-base-namespace))
|
||||||
|
(define-values (add-syntax done)
|
||||||
|
(make-traversal base-namespace #f))
|
||||||
|
|
||||||
|
(parameterize ([current-annotations annotations]
|
||||||
|
[current-namespace base-namespace])
|
||||||
|
(eval '(require (for-syntax racket/base)))
|
||||||
|
(add-syntax
|
||||||
|
(expand
|
||||||
|
'(let-syntax ([m (λ (_) #`(let ([x 1]) x))])
|
||||||
|
(m))))
|
||||||
|
(done))))
|
Loading…
Reference in New Issue
Block a user