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

Cannot reference inner classes of super classes by short name

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.8
    • Component/s: Compiler
    • Labels:
      None

      Description

      e.g. paste this in Groovy web console:

      import java.nio.channels.*
      
      abstract class Foo extends FileChannel {
        MapMode foo() { null }
      }
      print "hi"​​​
      

      startup failed:
      Script1.groovy: 5: unable to resolve class MapMode
      @ line 5, column 3.
      MapMode foo()

      { null }

      ^

      1 error

      If one qualifies the name: FileChannel.MapMode, the compilation succeeds

      From https://youtrack.jetbrains.com/issue/IDEA-140769

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gromopetr Peter Gromov
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: