Commit 12866bd8 authored by Dan Scales's avatar Dan Scales
Browse files

[dev.typeparams] Add CONVIFACE nodes in noder2, where possible

Changes to add CONVIFACE nodes where possible in noder2, even when the
args are typeparams. The transformation to insert a CONVIFACE node can
usually happen when there an obvious assignment/conversion to an
interface type from a non-interface type. So, we now do this
tranformation for:

 - direct conversions to an interface type

 - function arguments that are implicitly converted to an interface
   based on the parameter types.

 - EQ/NE comparison of an interface and a non-interface

With this change, we can remove some special case checks for CONVIFACE
nodes after transformation in node(), and instead just have the one
check in the CONVIFACE check.

Change-Id: I7cf2ef920aebf9e5553210aeaf19f344e128ca62
Reviewed-on: https://go-review.googlesource.com/c/go/+/336992


Trust: Dan Scales <danscales@google.com>
Reviewed-by: default avatarKeith Randall <khr@golang.org>
parent 4cdc65d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment