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
Member classes are not lifted correctly: they are no longer accessible from the original owner (outer definition).
The current lifter has these comment:
// the current problem is that we need extra code to find which variables were really defined by a function// this may be resolved in the future when the IR gets explicit variable declarations
// TODO: let declarations inside loops (also broken without class lifting)// I'll fix it once it's fixed in the IR since we will have more tools to determine// what locals belong to what block.
We should add explicit variable declarations and simplify this code.
Also see all the test cases in hkmc2/shared/src/test/mlscript/backlog/Lifter.mls
Modules are not lifted at all. In the future, we want to introduce parameterized modules, which would allow us to properly lift them. Though It's not clear if we want modules inside other definitions in the first place.
Lifting functions with spread arguments (i.e. fun f(...rest)) is broken.
This test does not work:
class A(x)withclass B(y)withfun getB()=x+yfungetA()=this.B(2).getB()A(1).getA()
as B is lifted out and the selection this.B does not have a FieldSymbol, meaning we can't properly detect references to the class B. See the relevant test in the backlog for a possible lifting method.
See Class Lifter #266 (comment)
TODO
let classon the others #278hkmc2/shared/src/test/mlscript/backlog/Lifter.mlsfun f(...rest)) is broken.this.Bdoes not have a FieldSymbol, meaning we can't properly detect references to the classB. See the relevant test in the backlog for a possible lifting method.See Class Lifter #266 (comment)