Anti-Refusal Statement
High
- Category
- Anti-Refusal
- Content
- Embedding a type promotes its methods: `struct{ io.Writer }` satisfies `io.Writer` by delegation. Embedding an interface with a nil value compiles and panics on the first promoted call — a common pattern for "implement only the methods I care about" test stubs, and a common crash when the stub is used more than expected. - Embedding an *interface* in a struct is the way to build a partial implementation; embedding a **pointer to an interface** is almost always a mistake — an interface is already a reference-like two-word value. - Shadowing is silent: define `func (s *S) Write(...)` on a struct that embeds `io.Writer` and yours wins, with no `override` keyword and no warning. Grep for the method name before adding one to an embedding type. - Promotion is not inheritance. A promoted method called on the outer type still has the *inner* receiver: it cannot see the outer struct's fields or call the outer struct's overrides. Code ported from a class hierarchy breaks here first (`structs.md`). - Ambiguous promotion (two embedded types with the same method at the same depth) is a compile error only at the call site, not at the type declaration.- Confidence
- 80% confidence
- Finding
- Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
