diff options
author | Nikita Popov <nikic@php.net> | 2015-02-19 20:17:37 +0100 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-03-17 21:51:53 +0100 |
commit | 5c230baf75fb17d1d0b8ec407a7479d02b25068a (patch) | |
tree | 866ca1a75f62398d13996c383f403a5e942a319e /Zend/zend_opcode.c | |
parent | f1a6c06f14834c0f3ef7769aef3917538f1f693b (diff) | |
download | php-git-5c230baf75fb17d1d0b8ec407a7479d02b25068a.tar.gz |
Implement Generator::getReturn()
Conflicts:
Zend/zend_vm_execute.h
Diffstat (limited to 'Zend/zend_opcode.c')
-rw-r--r-- | Zend/zend_opcode.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index fbfadfa871..526f9e2952 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -798,11 +798,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; |