stdClass|Iterator&Throwable is parsed as stdClass|Iterator

Open
#271 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
php
Domain
tooling

Research direction

No file or test is named in the issue. Start by reproducing how stdClass|Iterator&Throwable is parsed, then trace the PHPDoc parser's union and intersection handling. Done means the input either produces an error or parses as stdClass|(Iterator&Throwable), with coverage for the precedence behavior.

Written by the indexing model from the issue text.

Description

I would expect an error or stdClass|(Iterator&Throwable), since "and" usually has higher precedence than "or".

Dominant language
PHP
Stars
1.5k
Forks
78
Avg merge
9h 5m
Merged PRs (30d)
5

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 phpstan/phpdoc-parser

All issues in phpstan/phpdoc-parser

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.