Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #368575 +++ i int{@Property{getMethod = "getI"}}; function getI()returns(int) end function foo() i = 2; // Error end I should get a validation error if I try to assign a value to 'i', because there is no setter defined in the @Property annotation. Currently, no validation message is issued.
It is hard to tell, since this is not a full testcase, but it looks like the testcase may be invalid. Matt says that the property annotation is not honored everywhere. It is only honored when it appears on a field of an external type. The following full testcase should show the problem: externaltype javatype type javaobject a int {@property{getmethod = "geta"}}; b int; end externaltype jstype type javascriptobject a int {@property{getmethod = "geta"}}; b int; end library lib1 field1 javatype; field2 jstype; function f1() field1.a = 3; //1 invalid field1.b = 3; //0 field2.a = 3; //1 invalid field2.b = 3; //0 end end
The code was looking for the wrong annotation and the wrong package. The following classes were updated: JavaObjectFieldAccessValidator JavaScriptObjectFieldAccessValidator
Verified in Version: 0.8.0.v201203300902-1DV-FjuJ6QMOF4nynxT88h8G.