I was trying to fix #1910 and related issues by checking that the targets in 'for [target] in ...' and 'except Exception as [target]' are assignable expressions. However, rather than adding checkAssign calls at those sites, I wonder if it would be more elegant to do a check whenever we construct an expression. Specifically, I was thinking of calling checkGenericAssign() in the @after hooks of both 'expr' and 'test' constructors whenever the contextType is 'Store'. This approach should also eliminate the need for the checkAssign call, since every component of a Tuple or List that is used in a 'Store' context should have been verified to be assignable already.
Are there any problems with this approach, or does it sound good?
Also, I'm not clear what the difference between the expr.etype and expr.tree attributes are. Would be great if someone enlightened me :)