-For an expression x
of interface type
-and a type T
, the primary expression
+For an expression x
of interface type,
+but not a type parameter, and a type T
,
+the primary expression
@@ -5677,7 +5678,8 @@ switch x.(type) {Cases then match actual types
T
against the dynamic type of the expressionx
. As with type assertions,x
must be of -interface type, and each non-interface type +interface type, but not a +type parameter, and each non-interface typeT
listed in a case must implement the type ofx
. The types listed in the cases of a type switch must all be different.