compiler: fix ClassCastException compiling [Bindable] classes whose public var implements interface accessors (getter/setter) (closes #251)
Definitions should be more defensive about the type of nodes that they are associated with, rather than assuming a specific node type. Variables with [Bindable] metadata (or variables on classes with the metadata) will be converted into accessors, so the accessor definition will have a variable node instead of a function node as originally incorrectly assumed. Use getFunctionNode() or getVariableNode() instead of getNode(), and also check for null.
6 files changed