add test
This commit is contained in:
parent
c9e4cf1e48
commit
ecb105fb56
2 changed files with 17 additions and 0 deletions
12
zokrates_cli/examples/imports/inliner_state.zok
Normal file
12
zokrates_cli/examples/imports/inliner_state.zok
Normal file
|
@ -0,0 +1,12 @@
|
|||
from "./inliner_state_aux" import main as test
|
||||
|
||||
// we check that the constant inliner does not get corrupted
|
||||
// notice that the constant generic has the same name as the constant `K`
|
||||
// defined in the `test1.zok` module
|
||||
def tmp<K>():
|
||||
u32 junk = test() + K
|
||||
return
|
||||
|
||||
// dummy main
|
||||
def main():
|
||||
return
|
5
zokrates_cli/examples/imports/inliner_state_aux.zok
Normal file
5
zokrates_cli/examples/imports/inliner_state_aux.zok
Normal file
|
@ -0,0 +1,5 @@
|
|||
// the issue only shows if `K` is an array, renaming this constant to something else works
|
||||
const u32[1] K = [1]
|
||||
|
||||
def main() -> u32:
|
||||
return K[0]
|
Loading…
Reference in a new issue