aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-12-30 01:56:48 +0000
committermlugg <mlugg@mlugg.co.uk>2024-12-31 09:55:04 +0000
commit9ff80d7950a720cf80294ceaec54cc33d22f8871 (patch)
treef0ce20049b120f23316ff5a2b5756c71f30036e1 /test/compile_errors.zig
parent07b936c95fb460c1b71b0b246ba1576167442721 (diff)
downloadzig-9ff80d7950a720cf80294ceaec54cc33d22f8871.tar.gz
zig-9ff80d7950a720cf80294ceaec54cc33d22f8871.zip
cases: update to new compile error wordings
Diffstat (limited to 'test/compile_errors.zig')
-rw-r--r--test/compile_errors.zig8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig
index 447984d277..f566464bac 100644
--- a/test/compile_errors.zig
+++ b/test/compile_errors.zig
@@ -57,8 +57,8 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void {
\\}
, &[_][]const u8{
":3:12: error: unable to resolve comptime value",
- ":3:12: note: argument to function being called at comptime must be comptime-known",
- ":2:55: note: expression is evaluated at comptime because the generic function was instantiated with a comptime-only return type",
+ ":2:55: note: generic function instantiated with comptime-only return type '?fn () void' is evaluated at comptime",
+ ":2:55: note: use '*const fn () void' for a function pointer type",
});
case.addSourceFile("b.zig",
\\pub const ElfDynLib = struct {
@@ -198,7 +198,9 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void {
":8:36: error: runtime-known argument passed to comptime parameter",
":2:41: note: declared comptime here",
":13:32: error: unable to resolve comptime value",
- ":13:32: note: initializer of comptime only struct must be comptime-known",
+ ":13:32: note: initializer of comptime-only struct 'tmp.callAnytypeFunctionWithRuntimeComptimeOnlyType.S' must be comptime-known",
+ ":12:35: note: struct requires comptime because of this field",
+ ":12:35: note: types are not available at runtime",
});
case.addSourceFile("import.zig",