Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0-JSR-6
-
None
-
None
-
Groovy 1.0-JSR-6, Sun JDK 1.5.0_06, WinXP Prof
Description
Groovy should throw exception in following condition
A class (not instance) "Foo" already exists. If user try to assign the class with any experssion like below, Groovy should throw Exception. This excpetion make users know they can't assign any expression to an existing class
class Foo {
static def p()
}
Foo = "bar" //should throws Exception to prevent any further execution
println Foo // variable "Foo" still link to the class Foo not the String "bar"