Commit 90e852c4 authored by Stefan Behnel's avatar Stefan Behnel

generalise error message that disallows 'yield'/'await'/etc. inside of parallel sections

parent 9e65851e
...@@ -250,8 +250,7 @@ class MarkParallelAssignments(EnvTransform): ...@@ -250,8 +250,7 @@ class MarkParallelAssignments(EnvTransform):
def visit_YieldExprNode(self, node): def visit_YieldExprNode(self, node):
if self.parallel_block_stack: if self.parallel_block_stack:
error(node.pos, "Yield not allowed in parallel sections") error(node.pos, "'%s' not allowed in parallel sections" % node.expr_keyword)
return node return node
def visit_ReturnStatNode(self, node): def visit_ReturnStatNode(self, node):
......
...@@ -168,8 +168,8 @@ e_cython_parallel.pyx:55:9: local variable 'y' referenced before assignment ...@@ -168,8 +168,8 @@ e_cython_parallel.pyx:55:9: local variable 'y' referenced before assignment
e_cython_parallel.pyx:60:6: Reduction operator '*' is inconsistent with previous reduction operator '+' e_cython_parallel.pyx:60:6: Reduction operator '*' is inconsistent with previous reduction operator '+'
e_cython_parallel.pyx:62:36: cython.parallel.parallel() does not take positional arguments e_cython_parallel.pyx:62:36: cython.parallel.parallel() does not take positional arguments
e_cython_parallel.pyx:65:36: Invalid keyword argument: invalid e_cython_parallel.pyx:65:36: Invalid keyword argument: invalid
e_cython_parallel.pyx:73:12: Yield not allowed in parallel sections e_cython_parallel.pyx:73:12: 'yield' not allowed in parallel sections
e_cython_parallel.pyx:77:16: Yield not allowed in parallel sections e_cython_parallel.pyx:77:16: 'yield' not allowed in parallel sections
e_cython_parallel.pyx:97:19: Cannot assign to private of outer parallel block e_cython_parallel.pyx:97:19: Cannot assign to private of outer parallel block
e_cython_parallel.pyx:98:19: Cannot assign to private of outer parallel block e_cython_parallel.pyx:98:19: Cannot assign to private of outer parallel block
e_cython_parallel.pyx:104:6: Reductions not allowed for parallel blocks e_cython_parallel.pyx:104:6: Reductions not allowed for parallel blocks
......
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