Skip to content

Commit

Permalink
Merge pull request #45 from moeshin/fix-interface-inherit
Browse files Browse the repository at this point in the history
Fix interface inherit
  • Loading branch information
gzuidhof authored Oct 11, 2023
2 parents 374509b + d657763 commit 342962e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tygo/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ func (g *PackageGenerator) writeInterfaceFields(
if _, isFunc := f.Type.(*ast.FuncType); isFunc {
continue
}
if !didContainNonFuncFields {
if didContainNonFuncFields {
s.WriteString(" &\n")
} else {
s.WriteByte(
'\n',
) // We need to write a newline so comments of generic components render nicely.
Expand Down

0 comments on commit 342962e

Please sign in to comment.