Consider:
type Foo int
//go:fix inline
type Bar = Foo
type _ struct {
Bar
}
$ go fix --diff
--- /tmp/aa/main.go (old)
+++ /tmp/aa/main.go (new)
@@ -9,7 +9,7 @@
type Bar = Foo
type _ struct {
- Bar
+ Foo
}
Bar should never be inlined automatically (when embedded), since that changes the field name from Bar to Foo.
I noted that during the read of https://go.dev/blog/inliner where there is a mention that:
In principle the transformation should not change the program’s behavior (barring code that inspects the call stack, of course)
I assume this also is in regard to types?
CC @adonovan
Consider:
Bar should never be inlined automatically (when embedded), since that changes the field name from
BartoFoo.I noted that during the read of https://go.dev/blog/inliner where there is a mention that:
I assume this also is in regard to types?
CC @adonovan