You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of falling back to plain old Any, the typechecker should support union types in cases where inference cannot settle on just one type (and in the future when explicit type annotations are supported).
Therefore, in cases like:
var x = 5;
if foo {
x = true;
}
The typechecker should not give up and use Any, but instead have a Number | Bool type. This might need to happen after #26.
The text was updated successfully, but these errors were encountered:
This can lead to exponential blowup. Also, I think you need to be somewhat
careful and handle things like recursion carefully.
On Sat 10 Jun, 2017, 21:38 Vivek Ghaisas, ***@***.***> wrote:
Instead of falling back to plain old Any, the typechecker should support
union types in cases where inference cannot settle on just one type (and in
the future when explicit type annotations are supported).
Therefore, in cases like:
var x = 5;
if foo {
x = true;
}
The typechecker should not give up and use Any, but instead have a Number
| Bool type. This might need to happen after #26
<#26>.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#44>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABncjTs-RqlcEGNf-_IQPxdvE1KxdHNzks5sCvClgaJpZM4N2NAA>
.
--
Sending this from my phone, please excuse any typos!
Instead of falling back to plain old
Any
, the typechecker should support union types in cases where inference cannot settle on just one type (and in the future when explicit type annotations are supported).Therefore, in cases like:
The typechecker should not give up and use
Any
, but instead have aNumber | Bool
type. This might need to happen after #26.The text was updated successfully, but these errors were encountered: