Data update
This commit is contained in:
parent
8e4e15fa56
commit
72eb4943cb
1853 changed files with 35514 additions and 9441 deletions
|
|
@ -8,7 +8,7 @@ pub fn abs(a: i32) i32 {
|
|||
}
|
||||
|
||||
pub fn main() error{NotSupported}!void {
|
||||
if (builtin.zig_version.order(.{ .major = 0, .minor = 11, .patch = 0 }) == .lt) {
|
||||
if (builtin.zig_version.order(.{ .major = 0, .minor = 12, .patch = 1 }) == .lt) {
|
||||
std.debug.print("Version {any} is less than 0.11.0, not suitable, exiting!\n", .{builtin.zig_version});
|
||||
return error.NotSupported;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
const std = @import("std");
|
||||
const builtin = @import("builtin");
|
||||
|
||||
pub const first_integer_constant: i32 = 5;
|
||||
pub const second_integer_constant: i32 = 3;
|
||||
|
|
@ -10,7 +11,18 @@ pub const another_non_integer_constant: bool = false;
|
|||
pub fn main() void {
|
||||
comptime var cnt: comptime_int = 0;
|
||||
comptime var sum: comptime_int = 0;
|
||||
inline for (@typeInfo(@This()).Struct.decls) |decl_info| {
|
||||
if (comptime builtin.zig_version.order(.{ .major = 0, .minor = 13, .patch = 0 }) == .gt) {
|
||||
inline for (@typeInfo(@This()).@"struct".decls) |decl_info| {
|
||||
const decl = @field(@This(), decl_info.name);
|
||||
switch (@typeInfo(@TypeOf(decl))) {
|
||||
.int, .comptime_int => {
|
||||
sum += decl;
|
||||
cnt += 1;
|
||||
},
|
||||
else => continue,
|
||||
}
|
||||
}
|
||||
} else inline for (@typeInfo(@This()).Struct.decls) |decl_info| {
|
||||
const decl = @field(@This(), decl_info.name);
|
||||
switch (@typeInfo(@TypeOf(decl))) {
|
||||
.Int, .ComptimeInt => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue