Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

array_fill_keys does not convert decimal-int-string to int #14980

Copy link
Copy link

Description

@BackEndTea
Issue body actions

Bug report

Documenting an array key as int|decimal-int-string normalizes to int, but the array_fill_keys result does not do this. This causes the following error: Property DecimalIntBug::$data (array<int, true>) does not accept array<int|decimal-int-string, true>.

Code snippet that reproduces the problem

https://phpstan.org/r/59050767-df09-451f-9f0f-e7901a6cda30

Expected output

I'd expect neither assignment to result in an error

Did PHPStan help you today? Did it make you happy in any way?

No response

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.