Skip to content

An array<string,mixed> param given a nested literal refuses a later write of another kind #50

Closed

Description

@blacktrs

Summary

An array<string,mixed> param given a nested literal refuses a later write of another kind.

Repro

<?php
/** @param array<string,mixed> $m */
function t(array $m): void { $m['k'] = 'str'; var_dump($m['k']); }
t(['k' => ['a', 'b']]);

Expected (php 8.5)

string(3) "str"

Actual (manticore 10affa68, macOS arm64)


[exit code 255]
PHP Fatal error:  Uncaught TypeError: array{k: string[]} key k must be of type string[], string given

Tracking

Known-bug repro: tests/aot/repro/wrong/mixed_valued_param_shape.php — bash tests/aot/xfail.sh -k mixed_valued_param_shape reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.

Activity

  1. added
    bug
    wrong-answer
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugwrong-answer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions