Commit 2ea217bb authored by Mark Florisson's avatar Mark Florisson

Issue an error for invalid directives in 'with' statements

parent e9e67551
......@@ -638,6 +638,8 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
'is not allowed in %s scope' % (directive, scope)))
return False
else:
if directive not in Options.directive_defaults:
error(pos, "Invalid directive.")
return True
# Set up processing and handle the cython: comments.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment