1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

table: minor optimization of types.v (#7419)

This commit is contained in:
yuyi
2020-12-20 11:54:49 +08:00
committed by GitHub
parent af9766a7d6
commit 829334890b

View File

@ -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]