title: ImpossibleAssert layout: article

ImpossibleAssert occurs for a type assertion x.(T) when the value x of
interface cannot have dynamic type T, due to a missing or mismatching
method on T.

Example:
 type T int

 func (t *T) m() int { return int(*t) }

 type I interface { m() int }

 var x I
 var _ = x.(T)