Call initializers for out-of-pkg struct fields

This commit is contained in:
Nigel Tao committed 2017-12-03 14:22:49 +11:00
1 parent 6fec22c6d7
commit 7e73a5ac5f
4 files changed
+43 -32

No files matched your search

+2
View File
@@ -574,6 +574,8 @@ func (g *gen) writeCTypeName(b *buffer, n *a.TypeExpr, varNamePrefix string, var
// to generating "wuffs_bar__qux".
//
// TODO: sanitize or validate otherPkg, e.g. that it's ASCII only?
//
// See gen.writeInitializerImpl for a similar use of otherPkg.
prefix = "wuffs_" + otherPkg + "__"
}
b.printf("%s%s", prefix, innermost.Name().Str(g.tm))