Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-beta-4
-
Fix Version/s: 1.0-JSR-5
-
Component/s: class generator
-
Labels:None
Description
This code
void testUno() {
try { s = "bbb"; } finally { s.trim(); }
}
throws this exception
Failed to invoke suite(): java.lang.VerifyError: (class: ProvaTest, method: testUno signature: ()V) Register 1 contains wrong type
I think this code should fail with a "No such property: s", "s is out of scope" or something like that.
Issue Links
- is depended upon by
-
GROOVY-760
improve error reporting
-
if you enable the compiler checks in JSR-2 and write the method as part of a class, then groovy will inform you that s is undeclared two times. One for s="bbb" and the other for s.trim(). For scripts I am unsure how to solve this