fmt: fix fn return types list ending with comma (#14529)
parent
410b57b2fa
commit
3849cdcecc
|
@ -0,0 +1,5 @@
|
|||
fn ok(a int) (int, string) {
|
||||
return 11, 'hello'
|
||||
}
|
||||
|
||||
fn main() {}
|
|
@ -0,0 +1,5 @@
|
|||
fn ok(a int,) (int, string,) {
|
||||
return 11, 'hello'
|
||||
}
|
||||
|
||||
fn main() {}
|
|
@ -198,7 +198,7 @@ pub fn (mut p Parser) parse_multi_return_type() ast.Type {
|
|||
p.check(.lpar)
|
||||
mut mr_types := []ast.Type{}
|
||||
mut has_generic := false
|
||||
for p.tok.kind != .eof {
|
||||
for p.tok.kind !in [.eof, .rpar] {
|
||||
mr_type := p.parse_type()
|
||||
if mr_type.idx() == 0 {
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue