You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go/types, types2: better error message for some inference failures
For a unification failure involving a constraint, rather than just
reporting (for instance)
S does not match []E
now report the inferred type for the type parameter, use spec
terminology when referring to the constraint, and print the
constraint in full:
S (type func()) does not satisfy ~[]E
There's more we can do, but this is better than what we had.
For #60542.
Change-Id: I033369fa0dfc475f0ec0da0582e8cbefb109f3cf
Reviewed-on: https://go-review.googlesource.com/c/go/+/499639
Reviewed-by: Robert Griesemer <[email protected]>
Run-TryBot: Robert Griesemer <[email protected]>
Auto-Submit: Robert Griesemer <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
f/* ERROR "T does not match string" */ (s) // TODO(gri) better error message (T's type set only contains string!)
52
+
f/* ERROR "T (type []byte) does not satisfy interface{comparable; []byte | string}" */ (s) // TODO(gri) better error message (T's type set only contains string!)
0 commit comments