insert type assertions when narrowing.
R=r
OCL=24349
CL=24913
diff --git a/test/interface5.go b/test/interface5.go
index 2e273dd..86036a7 100644
--- a/test/interface5.go
+++ b/test/interface5.go
@@ -12,10 +12,21 @@
type I interface { M() }
var i I
+type I2 interface { M(); N(); }
+var i2 I2;
+
+var e interface { };
+
func main() {
+ e = t; // ok
+ t = e; // ERROR "need explicit"
+
// neither of these can work,
// because i has an extra method
// that t does not, so i cannot contain a t.
- i = t; // ERROR "missing|incompatible"
- t = i; // ERROR "missing|incompatible"
+ i = t; // ERROR "missing|incompatible|is not"
+ t = i; // ERROR "missing|incompatible|is not"
+
+ i = i2; // ok
+ i2 = i; // ERROR "need explicit"
}