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
New filter/projection system in place. Now it is a matter of adding filtering to the right side of boolean expressions based on the filters on the left side, plus a filter for assert. We can probably be more aggressive when narrowing types via assignment, and do it everytime instead of just if the right hand of the assignment is an or:
-- foo is declared as string|number|nil
foo = tostring(foo) -- foo now is a string
foo = tonumber(foo) -- foo now is a number (reverts to string|number|nil, then narrow again)
foo = f() -- f: () -> number|string, foo now is number|string
foo = g() -- g: () -> number|string|nil, foo reverts to its original type
This is technically easy to do, and sound if the standard limitations of filters are respected, but I worry it might be too confusing.
The text was updated successfully, but these errors were encountered:
New filter/projection system in place. Now it is a matter of adding filtering to the right side of boolean expressions based on the filters on the left side, plus a filter for assert. We can probably be more aggressive when narrowing types via assignment, and do it everytime instead of just if the right hand of the assignment is an or:
This is technically easy to do, and sound if the standard limitations of filters are respected, but I worry it might be too confusing.
The text was updated successfully, but these errors were encountered: