[dev.typeparams] cmd/compile: fix bug with types2.Instantiate with interface type param

types2.subst has an assertion that check is non-nil, but which breaks
Instantiate() with an interface type param (used when re-importing
instatiated type to types2). But this check was added when Instantiate()
was added, and things seem to work fine when the assertion is removed.

Fixes test/typeparam/mdempsky/7.go.

Change-Id: I4980f0b202a0b310a3c91a7a87f97576f54911de
Reviewed-on: https://go-review.googlesource.com/c/go/+/333155
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>
diff --git a/src/cmd/compile/internal/types2/subst.go b/src/cmd/compile/internal/types2/subst.go
index db01c36..7b4796f 100644
--- a/src/cmd/compile/internal/types2/subst.go
+++ b/src/cmd/compile/internal/types2/subst.go
@@ -313,9 +313,6 @@
 		embeddeds, ecopied := subst.typeList(t.embeddeds)
 		if mcopied || ecopied {
 			iface := &Interface{methods: methods, embeddeds: embeddeds, complete: t.complete}
-			if subst.check == nil {
-				panic("internal error: cannot instantiate interfaces yet")
-			}
 			return iface
 		}
 
diff --git a/test/run.go b/test/run.go
index 713e200..0251dc1 100644
--- a/test/run.go
+++ b/test/run.go
@@ -2209,7 +2209,6 @@
 	"typeparam/mdempsky/3.go",
 	"typeparam/mdempsky/4.go",
 	"typeparam/mdempsky/5.go",
-	"typeparam/mdempsky/7.go",
 	"typeparam/mdempsky/9.go",
 	"typeparam/mdempsky/11.go",
 	"typeparam/mdempsky/12.go",