You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recursive functions work but Structs with recursive methods crash with a segmentation fault
Steps to reproduce
@valuestructFactorialComputer:
fncompute(self, depth: UInt8) -> UInt8:
if depth ==0:
return1return depth *self.compute(depth -1)
fncompute(depth: UInt8) -> UInt8:
if depth ==1:
return1return depth * compute(depth -1)
fnmain():
vara= FactorialComputer().compute(1) # Segfault# var a = compute(1) # Worksprint(a)
System information
- What OS did you do install Mojo on ?
Ubuntu 22.04.3 LTS (on windows via WSL)
- Provide version information for Mojo by pasting the output of `mojo -v`
mojo 24.4.0 (2cb57382)
- Provide Modular CLI version by pasting the output of `modular -v`
modular 0.8.0 (39a426b5)
The text was updated successfully, but these errors were encountered:
Bug description
Recursive functions work but Structs with recursive methods crash with a segmentation fault
Steps to reproduce
System information
The text was updated successfully, but these errors were encountered: