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

Alias is ignored in constructor call

    XMLWordPrintableJSON

Details

    Description

      foo/Foo.groovy
      package foo
      
      class Foo {}
      
      test/test.groovy
      package test
      import foo.Foo as Bar
      
      class Bar {}
      
      def regular = new Bar()
      def anonymous = new Bar() {}
      println regular.class // class test.Bar
      println anonymous.class.superclass // class foo.Foo
      

      Either both of the invocations should use alias or both of them should use class defined in the same file.

      Attachments

        Issue Links

          Activity

            People

              emilles Eric Milles
              daniilo Daniil Ovchinnikov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: