vimeo/psalm

intersection types and conditional types

Open

#6.942 geöffnet am 18. Nov. 2021

Auf GitHub ansehen
 (18 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)PHP (668 Forks)batch import
Help wantedenhancementparser

Repository-Metriken

Stars
 (5.369 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 3T 12h) (5 gemergte PRs in 30 T)

Beschreibung

consider https://psalm.dev/r/8e871b2851

two things:

  • the parser forces me to use parentheses around the intersection type. I would not expect that to be needed
  • since from the condition we know that A is an array, I don't see why A&array should be forbidden

Contributor Guide