catala
catala copied to clipboard
`catala testcase write` generates multiple `using` directives
Hi,
In the catala testcase write plugin, a >Using directive is generated for each Test. (see https://github.com/CatalaLang/catala-language-server/blob/master/test-case-parser/test_case_parser_lib_atd.ml#L375 )
This means that when two tests require the same module, two "using" directives will be generated, which will occasionnally crash the compiler (for instance if an enum is defined into the required module, it will lead to a name clash apparently)
Would that be fixable? (e.g. make a set of necessary modules for each file and spit it at the beginning of the file?)
Thanks!
cc @AltGr
Fixed on branch cnaf-demo
TODO: check that fix is in master.