From 40afced8d74a58d66a4f0201c21eb187e50bf325 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Wed, 5 Jan 2022 21:37:04 -0800 Subject: [PATCH] spec: be more precise with rules on specific types Problem pointed out on golang-nuts mailing list. Change-Id: If1c9b22e1ed7b4ec7ebcaadc80fa450333e6856c Reviewed-on: https://go-review.googlesource.com/c/go/+/375799 Trust: Robert Griesemer Reviewed-by: Ian Lance Taylor --- doc/go_spec.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/go_spec.html b/doc/go_spec.html index c0b224f977..fa6630719b 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -1988,7 +1988,8 @@ More precisely, for a given interface, the set 𝑆 of specific types is defined
  • For an interface with type elements, 𝑆 is the intersection - of the specific types of its type elements. + of the specific types of its type elements with specific types + (type elements that have no specific types are ignored).
  • For a non-interface type term T @@ -2021,7 +2022,7 @@ interface{ ~string } // string interface{ int|~string } // int, string interface{ Celsius|Kelvin } // Celsius, Kelvin interface{ int; m() } // int (but type set is empty because int has no method m) -interface{ int; any } // no specific types (intersection is empty) +interface{ int; any } // int (any has no specific types and is ignored) interface{ int; string } // no specific types (intersection is empty) -- 2.50.0