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

Compiler behaviour different between script and compilation; line numbers missing in error message

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.7-beta-2
    • 1.6.5, 1.7-beta-2
    • Compiler
    • None
    • Ubuntu 9.04 Jaunty Jackalope, Sun Java 6, Groovy HEAD 2009-09-22T07:30+01:00

    Description

      The test case is a single line file:

      def x = 'a'
                      + 'b'
      

      This file can be compiled:

      |> groovyc build.gant
      |>

      and a class file is generated, but if run as a script:

      |> groovy build.gant
      Caught: org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: java.lang.String.positive() is applicable for argument types: () values: []
      |>

      which seems a bit inconsistent, not to mention lacking in line number, so two errors possibly.

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            russel Dr. Russel Winder
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: