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

4 + 'x' causes error. most-general-type rule not applied

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-beta-4
    • 1.0-beta-4
    • None
    • None

    Description

      groovy> 'x' + 4
      groovy>
      "x4"
      groovy> 4 + 'x'
      groovy>
      Caught: groovy.lang.MissingMethodException: No such method: plus for class: java.lang.Integer with arguments: [x]
      groovy.lang.MissingMethodException: No such method: plus for class: java.lang.Integer with arguments: [x]
      at groovy.lang.MetaClass.invokeStaticMethod(MetaClass.java:291)
      at groovy.lang.MetaClass.invokeMethod(MetaClass.java:247)
      at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:130)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:98)
      at CommandLine2.run(CommandLine2.groovy)

      Attachments

        Activity

          People

            guillaume Guillaume Sauthier
            morgan morgan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: