-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
TODO
- 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
We should add explicit variable declarations and simplify this code.// 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.
- Ordering problems introduced by the lifter will be solved by fixing Reorder simple classes and require
let classon the others #278 - 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:
as B is lifted out and the selection
class A(x) with class B(y) with fun getB() = x + y fun getA() = this.B(2).getB() A(1).getA()
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)