Minor bug in documentation
nanaknihal opened this issue · comments
In https://zokrates.github.io/toolbox/zokrates_js.html, const artifacts = zokratesProvider.compile(source)
gave me the following error
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "main.zok:
--> 1:30
|
1 | def main(private field a) -> field { return a * a; }
| ^---
|
= expected ty_array".] {
code: 'ERR_UNHANDLED_REJECTION'
}
This was fixed by changing const source = "def main(private field a) -> field { return a * a; }";
to const source = "def main(private field a) -> field: return a * a";