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

ResolveVisitor falsely resolves an import against itself

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.7.2, 1.8-beta-1
    • None
    • None

    Description

      ResolveVisitor seems to be resolving an unqualified import against itself by mistake.

      The following code should fail with a "Unable to resolve class Test" error, but due to the ResolveVisitor bug, it reaches ACG and then fails.

      import Test
      
      Test.foo()
      

      It is failing with the following message:

      Caught: BUG! exception in phase 'class generation' in source unit 'D:\Roshan\GroovyDevSetup\Workspace18x\Try18X\src\Try.groovy' ClassNode#getTypeClass for Roshan is called before the type class is set 
      

      Attachments

        Issue Links

          Activity

            People

              roshandawrani Roshan Dawrani
              roshandawrani Roshan Dawrani
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: