ircmaxell / Tuli

A static analysis engine
MIT License
170 stars 7 forks source link

Type callable includes Closure #7

Closed anlutro closed 9 years ago

ircmaxell commented 9 years ago

Technically, that's already covered (since Closure is a subtype of object).

I'm not really happy with the treatment of callable in general, since it's not really a union type as I'm defining it here, but a special type that requires a bit more indepth analysis. I may simply create its own type for it. Not really sure yet.

But since Closure is already a subtype of object, I don't really see much reason to single out closure...

Thanks though!!!!

anlutro commented 9 years ago

It occured to me that Closure should be a subtype of object after making the PR. However, I don't think it's working properly, as I'm getting errors like these: Type mismatch on call_user_func() argument 0, found Closure expecting callable