do not create interfaces containing interfaces

R=r
DELTA=16  (14 added, 0 deleted, 2 changed)
OCL=27464
CL=27466
This commit is contained in:
Russ Cox 2009-04-14 19:03:57 -07:00
parent ff73221d6f
commit 4b8c13dc20
3 changed files with 16 additions and 2 deletions

View file

@ -310,6 +310,12 @@ func TestInterfaceValue(t *testing.T) {
assert(v2.Type().String(), "interface { }");
v3 := v2.(reflect.InterfaceValue).Value();
assert(v3.Type().String(), "float");
i3 := v2.Interface();
if f, ok := i3.(float); !ok {
a, typ, c := sys.Reflect(i3);
t.Error("v2.Interface() did not return float, got ", typ);
}
}
func TestFunctionValue(t *testing.T) {