Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error when using nested list() #885

Open
Tsygankov-Slava opened this issue Aug 14, 2023 · 0 comments
Open

Compilation error when using nested list() #885

Tsygankov-Slava opened this issue Aug 14, 2023 · 0 comments
Labels
bug Something isn't working compiler Feature related to compiler

Comments

@Tsygankov-Slava
Copy link

Example code:

<?php
list($a, list($b, $c)) = array(1, array(2, 3));
var_dump($a, $b, $c);

Current output(Error):

Compilation error at stage: Gen tree postprocess, gen by gen-tree-postprocess.cpp:166
  index.php:3  in global scope
    list($a, list($b, $c)) = array(1, array(2, 3));

Unexpected list() not as left side of assignment

Expected output:

int(1)
int(2)
int(3)
@Tsygankov-Slava Tsygankov-Slava added bug Something isn't working compiler Feature related to compiler labels Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler Feature related to compiler
Projects
None yet
Development

No branches or pull requests

1 participant