Is the definition for comparable in builtin.go file wrong?

  Kiến thức lập trình

the definition is:

//comparable is an interface that is implemented by all comparable types // (booleans, numbers, strings, pointers, channels, arrays of comparable types, // structs whose fields are all comparable types). // The comparable interface may only be used as a type parameter constraint, // not as the type of a variable.

 type comparable interface{ comparable }

what does the definion mean? isn`t it a recursive interface?

LEAVE A COMMENT