summaryrefslogtreecommitdiff
path: root/Zend/zend_opcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_opcode.c')
-rw-r--r--Zend/zend_opcode.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index c1e3adb3ec..e44e586d9c 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -780,11 +780,6 @@ ZEND_API int pass_two(zend_op_array *op_array)
case ZEND_RETURN:
case ZEND_RETURN_BY_REF:
if (op_array->fn_flags & ZEND_ACC_GENERATOR) {
- if (opline->op1_type != IS_CONST || Z_TYPE_P(RT_CONSTANT(op_array, opline->op1)) != IS_NULL) {
- CG(zend_lineno) = opline->lineno;
- zend_error_noreturn(E_COMPILE_ERROR, "Generators cannot return values using \"return\"");
- }
-
opline->opcode = ZEND_GENERATOR_RETURN;
}
break;