Commit 50f4ebbd authored by Rob Findley's avatar Rob Findley Committed by Robert Findley
Browse files

cmd/compile/internal/types2: define Identical for instances

Instantiation of parameterized types may occur in other packages, so we
need an intrinsic notion of type identity for instances.

Add the natural definition: two instances are identical if their bases
and type arguments are identical.

Type unification was already considering type arguments, but has some
inaccurate logic with respect to objects. This will be addressed in a
follow-up CL.

Change-Id: Ib2ce67c05de65eb302ee588cc40c89c60018da50
Reviewed-on: https://go-review.googlesource.com/c/go/+/341856


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