Zig Version
0.11.0-dev.3952+82a9d5d78
Steps to Reproduce and Observed Behavior
The following code refuses to compile on 0.11.0-dev.3952+82a9d5d78 but compiles just fine on Godbolt on 0.10.0. So, the dependency loop error if presumably false.
src/main.zig:16:1: error: dependency loop detected
const ContinuationStackType = std.BoundedArray(SmolkContinuationNative, MAX_CONTINUATION_STACK_SIZE);
conststd=@import("std");
constKO_Ref=u16;
constKO_State=u16;
constKOErr=error {
GENERIC,
};
constMAX_CONTINUATION_STACK_SIZE=8;
constContinuationStackType=std.BoundedArray(SmolkContinuationNative, MAX_CONTINUATION_STACK_SIZE);
varkont_continuation_stack: ContinuationStackType= .{};
constSmolkPointerContinuationFunction=*constfn (pkos: *KO_State, kont_stack: *ContinuationStackType, args: SmolkContinuationNative) KOErr!SmolkContinuationNative;
constSMOLK_CONTINUATION_INITIAL_CALL_STATE=1;
constSmolkContinuationNative=struct {
pcfn: SmolkPointerContinuationFunction,
kor_result: KO_Ref,
};
pubfnkont_fail(pkos: *KO_State, kont_stack: *ContinuationStackType, args: SmolkContinuationNative) KOErr!SmolkContinuationNative
{
_=pkos;
_=kont_stack;
_=args;
std.debug.print("FAIL!\n", .{});
returnKOErr.GENERIC;
}
pubfnmain() !void {
trykont_continuation_stack.append(.{
.pcfn=kont_fail,
.kor_result=0,
});
std.debug.print("Stack: {any}\n", .{kont_continuation_stack});
}
Expected Behavior
Expected to compile.
Zig Version
0.11.0-dev.3952+82a9d5d78
Steps to Reproduce and Observed Behavior
The following code refuses to compile on 0.11.0-dev.3952+82a9d5d78 but compiles just fine on Godbolt on 0.10.0. So, the dependency loop error if presumably false.
Expected Behavior
Expected to compile.