aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/nested_error_set_mismatch.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-06-25 00:40:03 -0400
committerAndrew Kelley <andrew@ziglang.org>2023-06-25 12:00:48 -0700
commitb9c4857ed64fb18fa8cbc69112fd4fb4f8a5ac68 (patch)
tree48f6dde6a95bf44cadca07492f92fad5aca2ec85 /test/cases/compile_errors/nested_error_set_mismatch.zig
parent17e12960b5c12dd1dfb68940e70e9541dda856a2 (diff)
downloadzig-b9c4857ed64fb18fa8cbc69112fd4fb4f8a5ac68.tar.gz
zig-b9c4857ed64fb18fa8cbc69112fd4fb4f8a5ac68.zip
AstGen: add source location to certain const initializers
Before: assign_local_bad_coercion.zig:5:1: error: expected type 'u32', found 'u64' export fn constEntry() u32 { ^~~~~~ assign_local_bad_coercion.zig:11:19: error: expected type 'u32', found 'u64' var x: u32 = g(); ~^~ After: assign_local_bad_coercion.zig:6:21: error: expected type 'u32', found 'u64' const x: u32 = g(); ~^~ assign_local_bad_coercion.zig:11:19: error: expected type 'u32', found 'u64' var x: u32 = g(); ~^~
Diffstat (limited to 'test/cases/compile_errors/nested_error_set_mismatch.zig')
-rw-r--r--test/cases/compile_errors/nested_error_set_mismatch.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/cases/compile_errors/nested_error_set_mismatch.zig b/test/cases/compile_errors/nested_error_set_mismatch.zig
index c0d68a5e53..3addd5ee43 100644
--- a/test/cases/compile_errors/nested_error_set_mismatch.zig
+++ b/test/cases/compile_errors/nested_error_set_mismatch.zig
@@ -14,6 +14,6 @@ fn foo() ?OtherError!i32 {
// backend=llvm
// target=native
//
-// :4:1: error: expected type '?error{NextError}!i32', found '?error{OutOfMemory}!i32'
-// :4:1: note: optional type child 'error{OutOfMemory}!i32' cannot cast into optional type child 'error{NextError}!i32'
-// :4:1: note: 'error.OutOfMemory' not a member of destination error set
+// :5:34: error: expected type '?error{NextError}!i32', found '?error{OutOfMemory}!i32'
+// :5:34: note: optional type child 'error{OutOfMemory}!i32' cannot cast into optional type child 'error{NextError}!i32'
+// :5:34: note: 'error.OutOfMemory' not a member of destination error set