enso-org / dataframes

A library for working with tabular data in Luna.
https://luna-lang.org
MIT License
6 stars 5 forks source link

Fix pointer vs ptr type mismatch #148

Closed kustosz closed 5 years ago

kustosz commented 5 years ago

Pull Request Description

Recent fixes to the Luna typechecker surfaced an issue in this library. Array.with wrongly accepted Ptr where Pointer was declared. While it was fine on runtime, due to runtime API match, it was indeed an error. This PR fixes the issue.

Important Notes

ManagedPointer learned how to convert itself to a Pointer instead of a Ptr, and this is incorporated in this PR.

Checklist

Please include the following checklist in your PR:

mwu-tow commented 5 years ago

@kustosz Does this cover all instances of this issue, including the ones on typically unused code paths? It would be great if we could fix all the instances at once, instead of slowly discovering them over time. Does this fix #147? — I haven't looked into it but it looks like the same root cause

kustosz commented 5 years ago

@mwu-tow CI says the tests are passing, I have not found more usages of this pattern (it always went wrong with Array.with and it makes sense to me, since what changed was a definition of List.zip that started typechecking correctly). It does fix #147, yes.

mwu-tow commented 5 years ago

Ok, sounds good! CI tests are not really helpful in this case, as they are for C++ parts only. Luna parts tests unfortunately are broken, as in #88.