José Valim

Results 1969 comments of José Valim

> so we could make these rules smarter to disable them within defmacro? 💯

This is tricky because checking for duplicates will make it more expensive, potentially enough to show up on hot code paths. So it will depend if we can have a...

Closing in favor of the PR, even though we are not sure we can efficiently verify this, it depends on the implementation details.

Correct. the type system does not do narrowing (or occurrence typing) yet. Can you provide more details about the code though? In the code snippet that you shared, there is...

Oh, I got it. We need to perform type refinement on the guard and we plan to support this in the next Elixir version. However I am afraid the type...

I changed the title to reflect that the error is correct but the message is wrong. It should rather say about dead code.

The type system knows one of the sides of your `or` is always false because you have pattern matched on the struct. This is fine: ``` def delete( %Call{params: %{"conversation_params"...

Generally speaking, we only ignore warnings from macros if they are tagged as generated: true. Which is supported for types as of #13727. In the absence of the annotation, it...

Some updates to the folks tracking this issue. Elixir v1.18 will perform inference of patterns but not of guards yet, which means a better error message for this case is...

Closing this in favor of #13227. In particular, the "type inference of guards" bit. :)