╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ compile_errors.zig ───────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
203 , &[_][]const u8{ 204 ":4:33: error: unable to resolve comptime value", 205 ":4:33: note: argument to comptime parameter must be comptime-known", 206 ":1:29: note: parameter declared comptime here", 207 ":8:36: error: unable to resolve comptime value", 208 ":8:36: note: argument to comptime parameter must be comptime-known", 209 ":2:32: note: parameter declared comptime here", 210 ":13:32: error: unable to resolve comptime value", 211 ":13:32: note: initializer of comptime-only struct 'tmp.callAnytypeFunctionWithRuntimeComptimeOnlyType.S' must be comptime-known", 212 ":12:35: note: struct requires comptime because of this field", 213 ":12:35: note: types are not available at runtime", 214 }); 215 216 case.addSourceFile("import.zig", 217 \\pub fn comptimeBoolFunction(comptime _: bool) void {} 218 \\pub fn comptimeAnytypeFunction(comptime _: anytype) void {} 219 \\pub fn anytypeFunction(_: anytype) void {} 220 ); 221 } 222 223 { 224 const case = ctx.obj("invalid byte in string", b.graph.host); 225 226 case.addError("_ = \"\x01Q\";", &[_][]const u8{ 227 ":1:6: error: string literal contains invalid byte: '\\x01'", 228 }); 229 } 230 231 { 232 const case = ctx.obj("invalid byte in comment", b.graph.host); 233 234 case.addError("//\x01Q", &[_][]const u8{ 235 ":1:3: error: comment contains invalid byte: '\\x01'", 236 }); 237 } 238 239 { 240 const case = ctx.obj("control character in character literal", b.graph.host); 241 242 case.addError("const c = '\x01';", &[_][]const u8{ 243 ":1:12: error: character literal contains invalid byte: '\\x01'", 244 }); 245 } 246 247 { 248 const case = ctx.obj("invalid byte at start of token", b.graph.host); 249 250 case.addError("x = \x00Q", &[_][]const u8{ 251 ":1:5: error: expected expression, found 'invalid token'", 252 }); 253 } 254 } 255