diff --git a/vlib/v/checker/tests/nil.out b/vlib/v/checker/tests/nil.out index 74f4da2ba4..cbe3f705da 100644 --- a/vlib/v/checker/tests/nil.out +++ b/vlib/v/checker/tests/nil.out @@ -1,7 +1,6 @@ -vlib/v/checker/tests/nil.vv:3:18: error: use of untyped nil in assignment (use `unsafe`) +vlib/v/checker/tests/nil.vv:2:11: error: `nil` is only allowed in `unsafe` code 1 | fn main() { - 2 | unsafe { - 3 | value := nil - | ~~~ - 4 | println(value) - 5 | } + 2 | value := nil + | ~~~ + 3 | println(value) + 4 | } diff --git a/vlib/v/checker/tests/nil.vv b/vlib/v/checker/tests/nil.vv index 09deb0011f..6ed6db8d48 100644 --- a/vlib/v/checker/tests/nil.vv +++ b/vlib/v/checker/tests/nil.vv @@ -1,6 +1,4 @@ fn main() { - unsafe { - value := nil - println(value) - } + value := nil + println(value) }