Skip to content

Commit

Permalink
Don't allow internal names for abstract methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
takikawa committed Feb 13, 2012
1 parent 5d8eb4f commit 16c48b2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions collects/racket/private/class-internal.rkt
Expand Up @@ -753,6 +753,14 @@
(syntax->list (syntax (id ...))))]
[(-private . rest)
(bad "ill-formed private clause" stx)]
[(-abstract id ...)
(for-each
(lambda (id)
(unless (identifier? id)
(bad "abstract element is not an identifier" id)))
(syntax->list (syntax (id ...))))]
[(-abstract . rest)
(bad "ill-formed abstract clause" stx)]
[(form idp ...)
(and (identifier? (syntax form))
(ormap (lambda (f) (free-identifier=? (syntax form) f))
Expand All @@ -768,8 +776,7 @@
-inherit
-inherit/super
-inherit/inner
-inherit-field
-abstract)))))
-inherit-field)))))
(let ([form (syntax-e (syntax form))])
(for-each
(lambda (idp)
Expand Down Expand Up @@ -809,8 +816,6 @@
(bad "ill-formed inherit/inner clause" stx)]
[(-inherit-field . rest)
(bad "ill-formed inherit-field clause" stx)]
[(-abstract . rest)
(bad "ill-formed abstract clause" stx)]
[(kw idp ...)
(and (identifier? #'kw)
(or (free-identifier=? #'-rename-super #'kw)
Expand Down

0 comments on commit 16c48b2

Please sign in to comment.