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

Groovy Compiler and GroovyConsole work in a very different way

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Won't Fix
    • 1.0-RC-1
    • 1.0
    • None
    • None
    • Windows XP SP2, JDK 6.0 Final

    Description

      My code

      class Book
      {
      def name;
      Book(){}
      }

      boo = new Book();
      boo.setName("pcdinh");
      println boo.getName();

      GroovyConsole accepts without any compaints and print out: pcdinh
      Screenshot: http://img206.imageshack.us/my.php?image=groovyconsolehi0.png

      But Groovy compiler denied to run it
      Screenshot: http://img221.imageshack.us/my.php?image=groovycompilermt9.png

      The same case happens if I remove the declaration of the class Book so my code will become:

      boo = new Book();
      boo.setName("pcdinh");
      println boo.getName();

      GroovyConsole works well and does not generate any error but it is not the case with Groovy Compiler:

      Screenshot: http://img351.imageshack.us/my.php?image=groovycompiler2hy5.png

      Attachments

        Activity

          People

            guillaume Guillaume Sauthier
            pcdinh Dinh Pham
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: