Commits

Frank Wierzbicki committed 38d8ae4 Draft

Disallow assign to set and dict comprehension.

Comments (0)

Files changed (1)

src/org/python/antlr/GrammarActions.java

             errorHandler.error("can't assign to conditional expression", e);
         } else if (e instanceof ListComp) {
             errorHandler.error("can't assign to list comprehension", e);
+        } else if (e instanceof SetComp) {
+            errorHandler.error("can't assign to set comprehension", e);
+        } else if (e instanceof DictComp) {
+            errorHandler.error("can't assign to dict comprehension", e);
         }
-    }
+     }
 
     void checkAugAssign(expr e) {
         checkGenericAssign(e);