mirror of
https://github.com/twigphp/Twig.git
synced 2026-11-05 02:25:02 +00:00
Compile the generator guard as an unreachable yield instead of a yield from
This commit is contained in:
@@ -379,7 +379,7 @@ final class ModuleNode extends Node implements CoercesChildrenToStringInterface
|
||||
$compiler->subcompile($this->getNode('display_end'));
|
||||
|
||||
if (!$this->hasNode('parent')) {
|
||||
$compiler->write("yield from [];\n");
|
||||
$compiler->write("return; yield;\n");
|
||||
}
|
||||
|
||||
$compiler
|
||||
|
||||
Reference in New Issue
Block a user