aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/typeterm.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/types2/typeterm.go')
-rw-r--r--src/cmd/compile/internal/types2/typeterm.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/types2/typeterm.go b/src/cmd/compile/internal/types2/typeterm.go
index 8edbefa579..1d7223f13c 100644
--- a/src/cmd/compile/internal/types2/typeterm.go
+++ b/src/cmd/compile/internal/types2/typeterm.go
@@ -151,6 +151,9 @@ func (x *term) subsetOf(y *term) bool {
// disjoint reports whether x ∩ y == ∅.
// x.typ and y.typ must not be nil.
func (x *term) disjoint(y *term) bool {
+ if debug && (x.typ == nil || y.typ == nil) {
+ panic("invalid argument(s)")
+ }
ux := x.typ
if y.tilde {
ux = under(ux)