Commit ff9c18d5 authored by Stefan Behnel's avatar Stefan Behnel

fix error on def-nogil functions

parent b5d5b9f4
......@@ -2413,7 +2413,7 @@ def p_def_statement(s, decorators=None):
starstar_arg = p_py_arg_decl(s)
s.expect(')')
if p_nogil(s):
error(s.pos, "Python function cannot be declared nogil")
error(pos, "Python function cannot be declared nogil")
doc, body = p_suite(s, Ctx(level = 'function'), with_doc = 1)
return Nodes.DefNode(pos, name = name, args = args,
star_arg = star_arg, starstar_arg = starstar_arg,
......
def test() nogil:
pass
_ERRORS = """
2:0: Python function cannot be declared nogil
"""
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