-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior
Milestone
Description
Zig Version
0.11.0-dev.923+a52dcdd3c
Steps to Reproduce and Observed Behavior
Possibly related #14005
Observed Behavior:
error: struct 'GLib.SListNullable' depends on itself
pub const SListNullable = packed struct {
~~~~~~~^~~~~~
referenced by:
SListImpl: /home/chief/workplace/gir-zig/generate/output/GLib.zig:8243:30
SListNullable: /home/chief/workplace/gir-zig/generate/output/GLib.zig:8250:17
SListNullable: /home/chief/workplace/gir-zig/generate/output/GLib.zig:8249:34
SListImpl: /home/chief/workplace/gir-zig/generate/output/GLib.zig:8247:15Related code
pub const SListImpl = extern struct { // L8243
/// read write
Data: ?*anyopaque,
/// read write
Next: core.SListNullable, // L8247
};
pub const SListNullable = packed struct { // L8249
instance: ?*SListImpl, // L8250
pub fn new(self: ?SList) SListNullable {
return .{ .instance = if (self) |some| some.instance else null };
}
pub fn get(self: SListNullable) ?SList {
return if (self.instance) |some| SList{ .instance = some } else null;
}
};I failed to narrow down this. If extracted into small files, it behaves correctly. Maybe there is something to do with the file size.
Possibly related infomation
// GLib.zig
const core = @import("core.zig");
// core.zig
const GLib = @import("GLib.zig");
pub usingnamespace GLib;Expected Behavior
No error
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior