]> granicus.if.org Git - python/commitdiff
Complete switch cases in symtable.c; fixes bpo-35963 (GH-11821)
authorGuido van Rossum <guido@python.org>
Mon, 11 Feb 2019 19:34:50 +0000 (11:34 -0800)
committerGitHub <noreply@github.com>
Mon, 11 Feb 2019 19:34:50 +0000 (11:34 -0800)
Python/symtable.c

index 879e19ab79e04852ac32483b119a097de730b047..cade3045b3fccdaaed15a4e7d59dfc05976bb091 100644 (file)
@@ -309,6 +309,10 @@ PySymtable_BuildObject(mod_ty mod, PyObject *filename, PyFutureFeatures *future)
         PyErr_SetString(PyExc_RuntimeError,
                         "this compiler does not handle Suites");
         goto error;
+    case FunctionType_kind:
+        PyErr_SetString(PyExc_RuntimeError,
+                        "this compiler does not handle FunctionTypes");
+        goto error;
     }
     if (!symtable_exit_block(st, (void *)mod)) {
         PySymtable_Free(st);