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

Problems with the 'as' operator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.2
    • 1.7.3, 1.6.9, 1.8-beta-1
    • None
    • None
    • Mac OSX 10.6 with Java 1.6

    Description

      The following code reproduce the error:

      class Foo {}

      Foo.metaClass.invokeMethod = { String name, args ->
      for (arg in args)

      { arg.getClass() }

      }

      def f = new Foo()

      f.echo(f as Foo)

      Attachments

        1. v18x_4241_Patch.txt
          2 kB
          Roshan Dawrani
        2. v18x_4241B.patch
          0.5 kB
          Paul King
        3. v2_v18x_4241_Patch.txt
          1 kB
          Roshan Dawrani

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: