What version are you using?
main
What did you do?
With experimental_spec_shaking_v2 that recursively references itself through any built-in container (Vec, Option, Map, Result, a tuple, or a reference), and use it as a contract function parameter or return type:
#![no_std]
use soroban_sdk::{contract, contractimpl, contracttype, Symbol, Vec};
#[contracttype]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Recursive {
pub a: Symbol,
pub b: Vec<Recursive>,
}
#[contract]
pub struct Contract;
#[contractimpl]
impl Contract {
pub fn recursive(a: Recursive) -> Vec<Recursive> {
a.b
}
}
What did you expect to see?
Invoking recursive to function as expected
What did you see instead?
Stack overflow
What version are you using?
main
What did you do?
With
experimental_spec_shaking_v2that recursively references itself through any built-in container (Vec,Option,Map,Result, a tuple, or a reference), and use it as a contract function parameter or return type:What did you expect to see?
Invoking
recursiveto function as expectedWhat did you see instead?
Stack overflow