php-src/Zend/tests/generators
Sara Golemon 0fb640c717 Fix bug where yield from is captured too greedily
In the following piece of code:

```php
function from1234($x) {
  return $x;
}
function foo($x) {
  yield from1234($x);
}
```

The statement inside foo is taken as `yield from` `1234($x)`
which is neither the intent, nor even legal syntax for an fcall.

Do a lookahead for breaking non-label characters after the
`yield from` and only accept it if they occur.
2017-03-23 13:31:06 -07:00
..
errors Update exception names in tests after formatting changes. 2015-05-17 17:31:43 -05:00
finally Tweak uncaught exception message display 2015-05-17 18:47:06 +02:00
aborted_yield_during_nested_fcalls.phpt Avoid op_num = -1 in unfinished generator cleanup 2015-06-23 20:17:30 +02:00
aborted_yield_during_new.phpt Add test for previous commit 2015-06-20 18:38:59 +02:00
aborted_yield_during_switch.phpt Avoid op_num = -1 in unfinished generator cleanup 2015-06-23 20:17:30 +02:00
auto_incrementing_keys.phpt
backtrace.phpt
basic_yield_from_exception_handling.phpt Tweak uncaught exception message display 2015-05-17 18:47:06 +02:00
basic_yield_from_proxying.phpt Added yield from operator 2015-03-07 00:28:12 +01:00
bug63066.phpt Update exception names in tests after formatting changes. 2015-05-17 17:31:43 -05:00
bug65035.phpt
bug65161.phpt Update exception names in tests after formatting changes. 2015-05-17 17:31:43 -05:00
bug66041.phpt
bug67497.phpt Updated tests to reflect exception class changes. 2015-05-16 16:49:14 -05:00
bug69419.phpt Fixed bug #69419 2015-04-14 16:35:23 +02:00
bug70904.phpt Fixed bug #70904 (yield from incorrectly marks valid generator as finished) 2015-11-24 23:43:34 +01:00
bug70965.phpt Fixed bug #70965 (yield from with a common iterator primes too much) 2015-11-25 09:54:24 +01:00
bug71013.phpt Fixed bug #71013 (Incorrect exception handler with yield from) 2015-12-06 02:45:19 +01:00
bug71297.phpt Fixed bug #71297 (Memory leak with yield from) 2016-01-07 11:56:21 +01:00
bug71441.phpt Fixed bug #71441 (Typehinted Generator with return in try/finally crashes) 2016-01-24 19:55:16 +01:00
bug71601.phpt Fixed bug #71601 (finally block not executed after yield from) 2016-02-15 22:37:21 +01:00
clone.phpt Update exception names in tests after formatting changes. 2015-05-17 17:31:43 -05:00
dangling_send_target.phpt Fix dangling send target when using yield from 2016-02-11 16:25:16 +01:00
dynamic_call.phpt
fibonacci.phpt
func_get_args.phpt
generator_closure_unused.phpt Fixed memory leak 2015-05-14 17:07:32 +03:00
generator_closure_with_this.phpt
generator_closure.phpt
generator_in_multipleiterator.phpt
generator_method_by_ref.phpt
generator_method.phpt
generator_return_return_type.phpt Fully fix typed generator returns 2015-07-24 22:04:05 +02:00
generator_return_without_value.phpt Revert gd and mysqli to former calls for arg count errors. Fix first identified issues with zend_compile.c from nikic. Add tests for generator returns prior to first yield 2015-03-18 16:14:02 -04:00
generator_returns_generator.phpt
generator_rewind.phpt Tweak uncaught exception message display 2015-05-17 18:47:06 +02:00
generator_send.phpt
generator_static_method.phpt
generator_symtable_leak.phpt Fix memleak in generators using symtable 2015-05-14 17:17:39 +02:00
generator_throwing_during_function_call.phpt
generator_throwing_exception.phpt
generator_throwing_in_foreach.phpt Tweak uncaught exception message display 2015-05-17 18:47:06 +02:00
generator_trampoline.phpt Fixed calling generators through magic __call() 2016-11-28 12:20:19 +03:00
generator_with_keys.phpt
generator_with_nonscalar_keys.phpt
get_return_and_finally.phpt Implement Generator::getReturn() 2015-03-17 21:51:53 +01:00
get_return_errors.phpt Implement Generator::getReturn() 2015-03-17 21:51:53 +01:00
get_return_types.phpt Implement Generator::getReturn() 2015-03-17 21:51:53 +01:00
get_return.phpt Remove mentions of "type hint" and "typehint" 2015-12-24 15:19:31 +01:00
ignored_send_leak.phpt
multiple_yield_from_on_same_generator.phpt Fixed bug #70904 (yield from incorrectly marks valid generator as finished) 2015-11-24 23:43:34 +01:00
mutli_yield_from_with_exception.phpt Fix ClosedGeneratorException possibly thrown into wrong scope 2016-07-23 16:39:21 +02:00
nested_calls_with_die.phpt
nested_method_calls.phpt
no_foreach_var_leaks.phpt
recursive_yield_from.phpt Added yield from operator 2015-03-07 00:28:12 +01:00
send_after_close.phpt
send_returns_current.phpt
throw_already_closed.phpt Tweak uncaught exception message display 2015-05-17 18:47:06 +02:00
throw_caught.phpt Tweak uncaught exception message display 2015-05-17 18:47:06 +02:00
throw_into_yield_from_array.phpt Fixed bug causing exception not being thrown immediately into a generator yielding from an array 2015-11-25 23:09:44 +01:00
throw_not_an_exception.phpt Update exception names in tests after formatting changes. 2015-05-17 17:31:43 -05:00
throw_rethrow.phpt Tweak uncaught exception message display 2015-05-17 18:47:06 +02:00
throw_uncaught.phpt Tweak uncaught exception message display 2015-05-17 18:47:06 +02:00
unused_return_value.phpt
xrange.phpt
yield_array_key.phpt
yield_array_offset_by_ref.phpt
yield_by_reference.phpt
yield_closure.phpt
yield_during_function_call.phpt
yield_during_method_call.phpt
yield_from_already_running.phpt Update exception names in tests after formatting changes. 2015-05-17 17:31:43 -05:00
yield_from_array.phpt Added yield from operator 2015-03-07 00:28:12 +01:00
yield_from_backtrace.phpt Added yield from operator 2015-03-07 00:28:12 +01:00
yield_from_by_reference.phpt Forbid yield from in by-reference generators 2016-02-12 17:55:29 +01:00
yield_from_deep_recursion.phpt Merge branch 'coroutineDelegation' of https://github.com/bwoebi/php-src 2015-04-14 17:58:58 +02:00
yield_from_force_closed.phpt Forbid "yield from" in force closed generators 2016-05-28 13:21:05 +02:00
yield_from_greedy_parse.phpt Fix bug where yield from is captured too greedily 2017-03-23 13:31:06 -07:00
yield_from_iterator.phpt Fix yield from with iterator (first element missing) 2015-04-21 19:42:23 +02:00
yield_from_multi_tree_exception.phpt Tweak uncaught exception message display 2015-05-17 18:47:06 +02:00
yield_from_multi_tree.phpt Added yield from operator 2015-03-07 00:28:12 +01:00
yield_in_finally.phpt
yield_in_parenthesis.phpt
yield_precedence.phpt
yield_ref_function_call_by_reference.phpt
yield_unary_precedence.phpt Added test for bug #69160 (current behavior is correct) 2015-03-07 20:59:42 +01:00
yield_without_value.phpt