Skip to content

Commit

Permalink
Only classes can extend, not enums or interfaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
espenhw committed Feb 27, 2009
1 parent 3df3c16 commit 8b3a09f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/lisp/malabar-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,9 @@ in the list")

(defun malabar-extend-class (&optional class)
(interactive)
(unless (equal "class" (semantic-tag-type (malabar-get-class-tag-at-point)))
(error "Only classes can extend other classes; this is an %s"
(semantic-tag-type (malabar-get-class-tag-at-point))))
(unless (equal "java.lang.Object" (malabar-get-superclass-at-point))
(error "Java is limited to single inheritance, class already extends %s"
(malabar-get-superclass-at-point)))
Expand Down

0 comments on commit 8b3a09f

Please sign in to comment.