Attempting to use a
Type List in an Interface to restrict the types allowed to instantiate a generic function (
example in go2go). The Type List within the Constraint Interface (Santa) contains only one
struct type (SantaSad). This struct type and a second, independent struct type (SantaHappy) both implement the Constraint Interface (Santa) specified as a type parameter for the generic function. Given this situation, I expected the instantiation of the generic function with a type argument of the type (SantaSad), that appears in the Constraint's Interface Type List to succeed, which it does, and instantiating the generic function with the struct type, absent from the Type List (SantaHappy), to fail. However, instead of failing, this second case succeeds. Is this the intended behavior?