Bug #1385040: don't allow "def foo(a=1, b): pass" in the compiler package.
diff --git a/Lib/test/test_compiler.py b/Lib/test/test_compiler.py
index 483bc18..48f1643 100644
--- a/Lib/test/test_compiler.py
+++ b/Lib/test/test_compiler.py
@@ -56,6 +56,9 @@
def testYieldExpr(self):
compiler.compile("def g(): yield\n\n", "<string>", "exec")
+ def testDefaultArgs(self):
+ self.assertRaises(SyntaxError, compiler.parse, "def foo(a=1, b): pass")
+
def testLineNo(self):
# Test that all nodes except Module have a correct lineno attribute.
filename = __file__