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
The following example throws an error due to duplicate definition of a class List.
The error happens because we are importing the list file from two different files, namely main.enc and sss.enc.
-- file: main.enc
import list
import sss
class Main
def main(): void
new X
--file: list.enc
class List
def x(): void
()
--file: sss.enc
import list
class X
def x(): void
()
The text was updated successfully, but these errors were encountered:
Currently, the module implementation is not more sophisticated than a hash-include, so anything imported multiple times is included multiple times in the generated code.
It should be relatively easy to fix this – when I find time.
hi there, I have a half solution to this issue. it's in the branch features/module-include in my fork. This could be considered as a temporary patch if we want to have something working for the plenary. The main idea is to put all the imports in the Main class and some more mangling that I do... but not much.
So far, the example given above can run and compile (there might be some more bugs... you are welcome to help)
Shortcomings:
Classes have unique names, you cannot create two classes with the same name in different modules
same for functions
As I said, it's not ideal... but it's something :)
P.S. there might some other unknown bugs. If this is not helpful because we want to do it right from the beginning (whatever right means...), this is a prototype and we can throw it away
The following example throws an error due to duplicate definition of a class List.
The error happens because we are importing the list file from two different files, namely
main.enc
andsss.enc
.The text was updated successfully, but these errors were encountered: