mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
parent
f01f1e33c9
commit
3ce857d054
@ -4011,7 +4011,7 @@ pub const LoadedStructType = struct {
|
|||||||
|
|
||||||
pub fn haveFieldTypes(s: LoadedStructType, ip: *const InternPool) bool {
|
pub fn haveFieldTypes(s: LoadedStructType, ip: *const InternPool) bool {
|
||||||
const types = s.field_types.get(ip);
|
const types = s.field_types.get(ip);
|
||||||
return types.len == 0 or types[0] != .none;
|
return types.len == 0 or types[types.len - 1] != .none;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn haveFieldInits(s: LoadedStructType, ip: *const InternPool) bool {
|
pub fn haveFieldInits(s: LoadedStructType, ip: *const InternPool) bool {
|
||||||
|
|||||||
@ -0,0 +1,12 @@
|
|||||||
|
const A = struct {
|
||||||
|
a: u8,
|
||||||
|
bytes: [@sizeOf(A)]u8,
|
||||||
|
};
|
||||||
|
|
||||||
|
comptime {
|
||||||
|
_ = A;
|
||||||
|
}
|
||||||
|
|
||||||
|
// error
|
||||||
|
//
|
||||||
|
// :1:11: error: struct 'tmp.A' depends on itself
|
||||||
Loading…
x
Reference in New Issue
Block a user