#Inline call is recursive
1 messages · Page 1 of 1 (latest)
what does this mean 😄
the inline call is not recursive
again, depends exactly what you mean
please be more specific
inline fn foo() void {
foo();
}
this errors with error: inline call is recursive
the answer is you dont because that doesnt make much sense
oh yes of course
it would create an infinitely big binary
I see
I first defined said function as inline and called it in majn
it works just fine, but it refuses to work when I called it from another function
@wraith crown would this be valid:
pub fn main() !void {
@call(.always_inline, foo, .{});
}
fn foo() void {
foo();
}```
?
oh it causes a segsegv
lol
at runtime?
yes
yeah that makes sense, only the top level call is inline then it just recurses infinitely which segfaults