Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.21, 5.0.0-alpha-8, 4.0.21
-
None
Description
Consider the following:
@groovy.transform.TypeChecked void test(OutputStream os) { os.bytes = new byte[0] }
Compiler reports "No such property: bytes for class: java.io.OutputStream". This is because StaticTypeCheckingVisitor#existsProperty looks for isser/getter to determine property type. This only works for matched methods like "MetaClass getMetaClass()" and "void setMetaClass(MetaClass mc)".