mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v.ast: fix fmt of 'bytestr' to '&byte' (#12014)
This commit is contained in:
parent
d39fec3479
commit
8789cc422c
@ -31,8 +31,6 @@ const (
|
||||
'vlib/sqlite/orm.v' /* mut c &int -> mut c int */,
|
||||
'vlib/builtin/int_test.v' /* special number formatting that should be tested */,
|
||||
// TODOs and unfixed vfmt bugs
|
||||
'vlib/builtin/int.v' /* TODO byteptr: vfmt converts `pub fn (nn byteptr) str() string {` to `nn &byte` and that conflicts with `nn byte` */,
|
||||
'vlib/builtin/string_charptr_byteptr_helpers.v' /* TODO byteptr: a temporary shim to ease the byteptr=>&byte transition */,
|
||||
'vlib/v/tests/interop_test.v', /* bad comment formatting */
|
||||
'vlib/v/gen/js/tests/js.v', /* local `hello` fn, gets replaced with module `hello` aliased as `hl` */
|
||||
]
|
||||
|
@ -313,7 +313,6 @@ pub fn (nn i8) hex() string {
|
||||
return '00'
|
||||
}
|
||||
return u64_to_hex(u64(nn), 2)
|
||||
//return byte(nn).hex()
|
||||
}
|
||||
|
||||
// hex returns the value of the `u16` as a hexadecimal `string`.
|
||||
|
@ -948,17 +948,9 @@ pub fn (t &Table) type_to_str_using_aliases(typ Type, import_aliases map[string]
|
||||
// *clearly*, and that when a new kind is added, it should also be handled
|
||||
// explicitly.
|
||||
match sym.kind {
|
||||
.int_literal, .float_literal {
|
||||
res = sym.name
|
||||
}
|
||||
.byteptr {
|
||||
res = '&byte'
|
||||
}
|
||||
.charptr {
|
||||
res = '&char'
|
||||
}
|
||||
.int_literal, .float_literal {}
|
||||
.i8, .i16, .int, .i64, .isize, .byte, .u8, .u16, .u32, .u64, .usize, .f32, .f64, .char,
|
||||
.rune, .string, .bool, .none_, .voidptr {
|
||||
.rune, .string, .bool, .none_, .voidptr, .byteptr, .charptr {
|
||||
// primitive types
|
||||
res = sym.kind.str()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user