mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt: change [1,2,3]!!
to [1,2,3]!
(#8081)
This commit is contained in:
@ -68,7 +68,7 @@ fn (context Context) file2v(bname string, fbytes []byte, bn_max int) string {
|
|||||||
sb.write('$b, ')
|
sb.write('$b, ')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sb.write(']!!\n')
|
sb.write(']!\n')
|
||||||
return sb.str()
|
return sb.str()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2049,7 +2049,7 @@ pub fn (mut f Fmt) array_init(it ast.ArrayInit) {
|
|||||||
// `[100]byte`
|
// `[100]byte`
|
||||||
if it.is_fixed {
|
if it.is_fixed {
|
||||||
if it.has_val {
|
if it.has_val {
|
||||||
f.write('!!')
|
f.write('!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
f.write(f.table.type_to_str(it.elem_type))
|
f.write(f.table.type_to_str(it.elem_type))
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
fn foo() [1]f32 {
|
fn foo() [1]f32 {
|
||||||
return [f32(0.0)]!!
|
return [f32(0.0)]!
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
fn test_typeof() {
|
fn test_typeof() {
|
||||||
println(typeof(x))
|
println(typeof(x).name)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user