Groovy
  1. Groovy
  2. GROOVY-3895

Joint compiler doesn't like classes that contain methods with primitive types for names

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.6.5
    • Fix Version/s: 1.6.6, 1.7-rc-1
    • Component/s: None
    • Labels:
      None

      Description

      I defined a method like:

          Integer 'int'(String name) {
              def o = get(name)
              if(o instanceof Number) {
                 return o.intValue()
              }
              else if(o != null) {
                  try {
                      return Integer.parseInt(o.toString())
                  }
                  catch (NumberFormatException e) {
                  }
              }
          }
      

      This compiles fine in Groovy but blows up with the joint compiler with an error like:

       [groovyc] public  java.lang.Integer byte(java.lang.String name) { return (java.lang.Integer)null;}
      

        Activity

        Graeme Rocher created issue -
        Guillaume Delcroix made changes -
        Field Original Value New Value
        Fix Version/s 1.6.6 [ 15781 ]
        Fix Version/s 1.6.7 [ 16012 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.6.6 [ 15781 ]
        Resolution Cannot Reproduce [ 5 ]
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 1.6.7 [ 16012 ]
        Fix Version/s 1.7-beta-x [ 15538 ]
        Assignee Guillaume Laforge [ guillaume ]
        Fix Version/s 1.7-rc-1 [ 14666 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12732861 ] Default workflow, editable Closed status [ 12744606 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12970519 ] Default workflow, editable Closed status [ 12978269 ]

          People

          • Assignee:
            Guillaume Delcroix
            Reporter:
            Graeme Rocher
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development