// level1.uc
import { level2 } from './level2.uc'
function level1() {
level2();
}
export { level1 };
in the same directory of the files, run:
ucode -e "import * as m from './level1.uc'; m.level1();"
it'll fail with Runtime error: unknown opcode 0
Tho if you use named imports, or if there is only one level of imports, it'll work:
ucode -e "import { level1 } from './level1.uc'; level1();" # works!
ucode -e "import * as m from './level2.uc'; m.level2();" # works! (notice the ./level2.uc and not ./level1.uc)
When using
*
inimport
s (import * as m from './some-module.uc'
), ucode would throwRuntime error: unknown opcode 0
.To reproduce:
level2.uc
:level1.uc
:it'll fail with
Runtime error: unknown opcode 0
Tho if you use named imports, or if there is only one level of imports, it'll work: