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

Casting the superclass object and calling it stack overflows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.0
    • 4.0.0-rc-2
    • None
    • None

    Description

      import groovy.transform.CompileStatic as S
      
      @S class A { def oo() { println 'a' } }
      @S class B extends A { def oo() { println 'b' } }
      @S class C extends B { def oo() { ((A) super).oo() } }
      
      new C().oo()

      Either casting super should give an error or there should be functionality to use some method handle to do this.

      Attachments

        Activity

          People

            emilles Eric Milles
            deathlord death lord
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h