-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Closed
Labels
bugenhancementFeature requests, new feature implementationsFeature requests, new feature implementations
Description
The following code runs correctly with the default or "native" codegens, but runs and produces incorrect output with the "viper" codegen:
@micropython.viper
def fib(n:int) -> int:
if n == 0: return 0
if n == 1: return 1
return fib(n - 1) + fib(n - 2)
def test():
res = []
for i in range(36):
res.append(str(fib(i)))
print(' '.join(res))
test()
Metadata
Metadata
Assignees
Labels
bugenhancementFeature requests, new feature implementationsFeature requests, new feature implementations