Skip to content

Support constant string/int as template bound#1402

Merged
ondrejmirtes merged 1 commit intophpstan:1.7.xfrom
rvanvelzen:bug-7381
Jun 7, 2022
Merged

Support constant string/int as template bound#1402
ondrejmirtes merged 1 commit intophpstan:1.7.xfrom
rvanvelzen:bug-7381

Conversation

@rvanvelzen
Copy link
Copy Markdown
Contributor

Fixes phpstan/phpstan#7381. In general constant string/int bounds don't make much sense, but they can appear when key-of<T> is resolved.

@Seldaek
Copy link
Copy Markdown
Contributor

Seldaek commented Jun 7, 2022

Thanks!

@ondrejmirtes ondrejmirtes merged commit 6fe8a46 into phpstan:1.7.x Jun 7, 2022
@ondrejmirtes
Copy link
Copy Markdown
Member

Perfect, thank you!

@rvanvelzen rvanvelzen deleted the bug-7381 branch June 13, 2022 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Offset access type where array has only one key fails with bound type string not supported

3 participants