Commit 7db75b36 authored by Robert Griesemer's avatar Robert Griesemer
Browse files

go/types, types2: ensure we have an interface before checking constraints

Due to delayed computation of constraint type sets it is possible that
a type argument is checked against a constraint before that constraint
has been wrapped into an implicit interface (if needed).

When the type checker is about to check whether a type argument
implements a constraint, it's always safe to force wrapping of
a constraint in an implicit interface (if necessary) before doing
the implements check.

Also, use a better position for tracing output related to constraint
type set computation.

Fixes #51048.

Change-Id: I52fecbf57814f09b62762452d7e17c2a230fdd59
Reviewed-on: https://go-review.googlesource.com/c/go/+/383834


Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: default avatarRobert Findley <rfindley@google.com>
parent 49030c87
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment