3 ms·
Cannot make a type in a foreign package implement an interface The idiomatic way of adding an interface to a foreign type is to declare your own local alias an
by kitd 4y ago
Cannot make a type in a foreign package implement an interface
The idiomatic way of adding an interface to a foreign type is to declare your own local alias and use that to implement the interface. At least then the added functionality is confined to a known package and won't lead to surprising behaviour elsewhere.