Avoid ignoring class/unit forms at the top-level
Possibly a better long-term solution (for after the release) is to not use the ignore property here and instead just use the ignore table.
This commit is contained in:
parent
c3a59ee1c4
commit
5fa40de546
|
@ -65,8 +65,14 @@
|
|||
(local-expand/capture* #'e 'top-level (kernel-form-identifier-list))))
|
||||
(syntax-parse head-expanded
|
||||
#:literal-sets (kernel-literals)
|
||||
[(begin (define-values (n) _) ... (~or _:ignore^ _:ignore-some^))
|
||||
#'e]
|
||||
[(begin (define-values (n) _) ...
|
||||
(~and (~or _:ignore^ _:ignore-some^)
|
||||
(~not (~or _:tr:class^
|
||||
_:tr:unit^
|
||||
_:tr:unit:invoke^
|
||||
_:tr:unit:compound^
|
||||
_:tr:unit:from-context^))))
|
||||
head-expanded]
|
||||
;; keep trampolining on begins
|
||||
[(begin (define-values (n) e-rhs) ... (begin e ... e-last))
|
||||
#`(begin (tc-toplevel-trampoline orig-stx (define-values (n) e-rhs))
|
||||
|
|
8
typed-racket-test/fail/top-level-unit-and-class.rkt
Normal file
8
typed-racket-test/fail/top-level-unit-and-class.rkt
Normal file
|
@ -0,0 +1,8 @@
|
|||
#lang racket/load
|
||||
|
||||
;; A test for GH issue #220
|
||||
|
||||
(require typed/racket)
|
||||
|
||||
(class object% (super-new) (+ 1 "foo"))
|
||||
(unit (import) (export) (+ 1 "foo"))
|
Loading…
Reference in New Issue
Block a user