fmt: change `[1,2,3]!!` to `[1,2,3]!` (#8081)
parent
ac85257ea0
commit
7458b699d0
|
@ -68,7 +68,7 @@ fn (context Context) file2v(bname string, fbytes []byte, bn_max int) string {
|
|||
sb.write('$b, ')
|
||||
}
|
||||
}
|
||||
sb.write(']!!\n')
|
||||
sb.write(']!\n')
|
||||
return sb.str()
|
||||
}
|
||||
|
||||
|
|
|
@ -2049,7 +2049,7 @@ pub fn (mut f Fmt) array_init(it ast.ArrayInit) {
|
|||
// `[100]byte`
|
||||
if it.is_fixed {
|
||||
if it.has_val {
|
||||
f.write('!!')
|
||||
f.write('!')
|
||||
return
|
||||
}
|
||||
f.write(f.table.type_to_str(it.elem_type))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
fn foo() [1]f32 {
|
||||
return [f32(0.0)]!!
|
||||
return [f32(0.0)]!
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
fn test_typeof() {
|
||||
println(typeof(x))
|
||||
println(typeof(x).name)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue