diff --git a/doc/go_spec.html b/doc/go_spec.html index 49533b067d..061f933ae8 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -4514,6 +4514,12 @@ Each list is processed in a separate phase: +
+While unification is successful, processing of each list continues until all list elements +are considered, even if all type arguments are inferred before the last list element has +been processed. +
+Example:
@@ -4527,6 +4533,13 @@ min(1.0, 2.0) // T is float64, inferred from default type for 1.0 and matches d min(1.0, 2) // illegal: default type float64 (for 1.0) doesn't match default type int (for 2) +
+In the example min(1.0, 2)
, processing the function argument 1.0
+yields the substitution map entry T
→ float64
. Because
+processing continues until all untyped arguments are considered, an error is reported. This
+ensures that type inference does not depend on the order of the untyped arguments.
+