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

Cannot reference inner classes of super classes by short name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.5.8
    • Compiler
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: