From 5340f8afea48eee81b5fcfa71aa36028841e9b59 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 21 Jul 2022 23:05:02 +0300 Subject: [PATCH] ci: fix vlib/v/checker/tests/nil.vv and its .out file --- vlib/v/checker/tests/nil.out | 11 +++++------ vlib/v/checker/tests/nil.vv | 6 ++---- 2 files changed, 7 insertions(+), 10 deletions(-) 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) }