Compile error when using `array_merge_into` and array without specified type

Open
#822 0 comments 0 reactions 1 assignee View on GitHub

@mkornaukhov is already working on this.

Since May 11, 2023.

Assessment

This issue has not been assessed yet.

Description

bug

Example code:

<?php

function main()
{
    $arr_one = [];
    $arr_two = [];

    if (1) {
        $arr_one = [1, 2, 3];
    }

    $result = [];
    array_merge_into($result, $arr_one);
    array_merge_into($result, $arr_two);

    var_dump($result);
}

main();

Problem c++ code:

  array< int64_t > v$arr_one;
  array< Unknown > v$arr_two;
  array< int64_t > v$result;
Dominant language
C++
Stars
1.5k
Forks
116
Avg merge
5d 17h
Merged PRs (30d)
11

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from VKCOM/kphp

All issues in VKCOM/kphp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.