Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Won't Fix
-
1.0-RC-1
-
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