From 829334890be99e7d4fb8dc0c41d160fd96d38f03 Mon Sep 17 00:00:00 2001 From: yuyi Date: Sun, 20 Dec 2020 11:54:49 +0800 Subject: [PATCH] table: minor optimization of types.v (#7419) --- vlib/v/table/types.v | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vlib/v/table/types.v b/vlib/v/table/types.v index ce97f1c1d4..44e9861317 100644 --- a/vlib/v/table/types.v +++ b/vlib/v/table/types.v @@ -431,7 +431,11 @@ pub enum Kind { } pub fn (t &TypeSymbol) str() string { - return t.name.replace('array_', '[]') + if t.kind in [.array, .array_fixed] { + return t.name.replace('array_', '[]') + } else { + return t.name + } } [inline]