Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2555

Calling abstract super method causes stack overflow instead of compiler error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.5.2, 1.6-rc-2
    • 1.5.6, 1.6-beta-1
    • None
    • None

    Description

      I accidentally wrote some code that called an abstract method on a superclass and received a StackOverflowError instead of a compiler error (the method was calling itself despite the "super."...). Doing the same thing in Java results in an error like "abstract method theMethod() in A cannot be accessed directly" and I think Groovy should probably do something similar (see the attached test case).

      Attachments

        1. abstract-super-method-test.diff
          0.7 kB
          Mike Dillon

        Activity

          People

            paulk Paul King
            md5 Mike Dillon
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: