From 4bac22e88898158fc49e69db5bbe26a324797d68 Mon Sep 17 00:00:00 2001 From: Sahnvour Date: Sat, 2 Mar 2019 18:12:56 +0100 Subject: all integers returned by @typeInfo are now comptime_int --- src/codegen.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/codegen.cpp') diff --git a/src/codegen.cpp b/src/codegen.cpp index 77832e215d..52e20108de 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -7492,18 +7492,18 @@ Buf *codegen_generate_builtin_source(CodeGen *g) { "\n\n" " pub const Int = struct {\n" " is_signed: bool,\n" - " bits: u8,\n" + " bits: comptime_int,\n" " };\n" "\n" " pub const Float = struct {\n" - " bits: u8,\n" + " bits: comptime_int,\n" " };\n" "\n" " pub const Pointer = struct {\n" " size: Size,\n" " is_const: bool,\n" " is_volatile: bool,\n" - " alignment: u32,\n" + " alignment: comptime_int,\n" " child: type,\n" "\n" " pub const Size = enum {\n" @@ -7515,7 +7515,7 @@ Buf *codegen_generate_builtin_source(CodeGen *g) { " };\n" "\n" " pub const Array = struct {\n" - " len: usize,\n" + " len: comptime_int,\n" " child: type,\n" " };\n" "\n" @@ -7527,7 +7527,7 @@ Buf *codegen_generate_builtin_source(CodeGen *g) { "\n" " pub const StructField = struct {\n" " name: []const u8,\n" - " offset: ?usize,\n" + " offset: ?comptime_int,\n" " field_type: type,\n" " };\n" "\n" @@ -7548,7 +7548,7 @@ Buf *codegen_generate_builtin_source(CodeGen *g) { "\n" " pub const Error = struct {\n" " name: []const u8,\n" - " value: usize,\n" + " value: comptime_int,\n" " };\n" "\n" " pub const ErrorSet = struct {\n" @@ -7557,7 +7557,7 @@ Buf *codegen_generate_builtin_source(CodeGen *g) { "\n" " pub const EnumField = struct {\n" " name: []const u8,\n" - " value: usize,\n" + " value: comptime_int,\n" " };\n" "\n" " pub const Enum = struct {\n" @@ -7609,7 +7609,7 @@ Buf *codegen_generate_builtin_source(CodeGen *g) { " };\n" "\n" " pub const Vector = struct {\n" - " len: u32,\n" + " len: comptime_int,\n" " child: type,\n" " };\n" "\n" -- cgit v1.2.3