Commits

Frank Wierzbicki committed 38d8ae4

Disallow assign to set and dict comprehension.

  • Participants
  • Parent commits 4795a35

Comments (0)

Files changed (1)

File 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);