Matthew Brown

Results 64 comments of Matthew Brown

OTOH I imagine these errors are relatively rare, and it might parsing every regex might slow Psalm down a little

This looks good! You might want to look at the test file config to only generate for production files

I agree that it looks similar, but this don't think this violates LSP in the way overriding a `void`-returning function does.

I believe TypeScript's rules allow `void` return to be overridden because of this (quite common) use case (see https://github.com/Microsoft/TypeScript/issues/4544). If I'm to guess, `void` return overrides are a side-effect.

Psalm has some special behaviour for `array_map` because it knows the type of the first array is unpacked into the argument for the second. Imagine that the params are flipped:...

> can this special behavior be replicated for other functions using a plugin No, but once I figure out how Hack is doing it this will work in Psalm. Given...

http://www.cs.utexas.edu/users/EWD/ewd02xx/EWD215.PDF