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
src/bun.js/api/bun/dns_resolver.zig:1144:31: note: struct requires comptime because of this field
pending_host_cache_cares: PendingCache = PendingCache.init(),
pubconstDNSResolver=struct {
pending_host_cache_cares: PendingCache=PendingCache.init(),
// ^ I don't think this will force DNSResolver to be comptime
};
constPendingCache=bun.HiveArray(GetAddrInfoRequest.PendingCacheKey, 32);
pubfnHiveArray(comptimeT: type, comptimecapacity: u16) type {
returnstruct {
constSelf=@This();
buffer: [capacity]T=undefined,
available: std.bit_set.IntegerBitSet(capacity) =std.bit_set.IntegerBitSet(capacity).initFull(),
pubconstsize=capacity;
pubfninit() Self {
return .{};
}
};
}
Expected Behavior
Maybe should've not got these errors? not very sure.
The text was updated successfully, but these errors were encountered:
CGQAQ
added
the
bug
Observed behavior contradicts documented or intended behavior
label
Aug 22, 2023
Not sure I agree (@TypeOf(type) is perfectly legal), but at least transitively pointing to the member(s), and noting that its type is type, would be helpful.
Zig Version
0.11
Steps to Reproduce and Observed Behavior
compile bun with
0.11.0
or0.12.0
compiler errors emitted:
0.11.0
0.12.0-dev.157+8e96be008
I think it's related to https://ziglang.org/download/0.11.0/release-notes.html#Forbid-Runtime-Operations-in-comptime-Blocks-
see oven-sh/bun#4233 (comment) for context
An example in these errors:
Expected Behavior
Maybe should've not got these errors? not very sure.
The text was updated successfully, but these errors were encountered: