racket / drracket

DrRacket, IDE for Racket
http://www.racket-lang.org/
Other
447 stars 94 forks source link

bug in check syntax #425

Closed yjqww6 closed 3 years ago

yjqww6 commented 3 years ago

Paste the following program into DrRacket, press the "Check Syntax" button.

#lang racket
(require (for-meta 2 racket/base))
(begin-for-syntax
  (begin-for-syntax
    (module a racket/base)))

No arrows or highlights for identifier module and identifiers inside submodule a. Also, racket/base in the "for-meta 2" require is red, but its bindings are indeed used.

I am using racketcs 7.8.


https://github.com/racket/drracket/blob/1b89271ed1843ac501abcd8476cbf4d8603cf52d/drracket-tool-lib/drracket/private/syncheck/traversals.rkt#L404 https://github.com/racket/drracket/blob/1b89271ed1843ac501abcd8476cbf4d8603cf52d/drracket-tool-lib/drracket/private/syncheck/traversals.rkt#L417 From my previous experience, simply matching #%plain-module-begin in the same phase with module is problematic. And it seems replacing #%plain-module-begin with _ solves this problem.

rfindler commented 3 years ago

Thank you!