From 79f26e9ca562cc4e692913432299cb9bbf906478 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 19 Feb 2015 20:17:37 +0100 Subject: Implement Generator::getReturn() --- Zend/zend_opcode.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'Zend/zend_opcode.c') 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; -- cgit v1.2.1