The type system seems to accept it in vscode, but when I go to compile it says it can’t find one of them.
Ah, nevermind about vscode, it seemed to be working but then when I closed and reopened it I now get the error about it not being found and if I look at the logs for the Moonbit extension I see “error: cyclic dependency detected”. So it seems it’s not supported. I can place things in the same package, but I put them in separate packages because I need to import methods from them and it looks like the current export system doesn’t provide a way for you to specify which method you’re trying to export e.g. you can’t export both A::new()
and B::new()
as they’re both just new
. So I have to use a different unique naming convention. Not a huge deal, but just some feedback that I ran into this.
Feel free to share any tips.
Yeah, I think we should give warning for the name conflict @Yu-zh. Maybe we should restrict the exportation to plain functions only?