fmt: fix rare extra tab after a SumType (#8035)

pull/8032/head
Lukas Neubert 2021-01-11 22:19:42 +01:00 committed by GitHub
parent 72317975fc
commit 5d6e9f7bf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -28,7 +28,6 @@ pub type ScopeObject = ConstField | GlobalField | Var
// TOOD: replace table.Param // TOOD: replace table.Param
pub type Node = ConstField | EnumField | Expr | Field | File | GlobalField | IfBranch | pub type Node = ConstField | EnumField | Expr | Field | File | GlobalField | IfBranch |
MatchBranch | ScopeObject | SelectBranch | Stmt | StructField | StructInitField | table.Param MatchBranch | ScopeObject | SelectBranch | Stmt | StructField | StructInitField | table.Param
pub struct Type { pub struct Type {
pub: pub:

View File

@ -574,7 +574,9 @@ pub fn (mut f Fmt) type_decl(node ast.TypeDecl) {
if i < sum_type_names.len - 1 { if i < sum_type_names.len - 1 {
f.write(' | ') f.write(' | ')
} }
f.wrap_long_line(2, true) if i < sum_type_names.len - 1 {
f.wrap_long_line(2, true)
}
} }
// f.write(sum_type_names.join(' | ')) // f.write(sum_type_names.join(' | '))
comments << node.comments comments << node.comments