From 6acf01a4a0d52959ef14313cc46a1e0df331b43d Mon Sep 17 00:00:00 2001 From: Swastik Baranwal Date: Sun, 9 Apr 2023 17:12:21 +0530 Subject: [PATCH] checker: disallow more reserved types to be used as variable names (#17917) --- vlib/v/checker/checker.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 7b5d9479bd..207ce14c1f 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -29,7 +29,7 @@ pub const ( array_builtin_methods_chk = token.new_keywords_matcher_from_array_trie(array_builtin_methods) // TODO: remove `byte` from this list when it is no longer supported reserved_type_names = ['byte', 'bool', 'char', 'i8', 'i16', 'int', 'i64', 'u8', 'u16', - 'u32', 'u64', 'f32', 'f64', 'map', 'string', 'rune'] + 'u32', 'u64', 'f32', 'f64', 'map', 'string', 'rune', 'usize', 'isize', 'voidptr'] reserved_type_names_chk = token.new_keywords_matcher_from_array_trie(reserved_type_names) vroot_is_deprecated_message = '@VROOT is deprecated, use @VMODROOT or @VEXEROOT instead' )