@@ -1083,6 +1083,21 @@ type structWithSelfPtr struct {
10831083 s string
10841084}
10851085
1086+ type deepEqualInterface interface {
1087+ Foo ()
1088+ }
1089+
1090+ type deepEqualConcrete struct {
1091+ int
1092+ }
1093+
1094+ func (deepEqualConcrete ) Foo () {}
1095+
1096+ var (
1097+ deepEqualConcrete1 = deepEqualConcrete {1 }
1098+ deepEqualConcrete2 = deepEqualConcrete {2 }
1099+ )
1100+
10861101func init () {
10871102 loop1 = & loop2
10881103 loop2 = & loop1
@@ -1115,6 +1130,7 @@ var deepEqualTests = []DeepEqualTest{
11151130 {[]byte {1 , 2 , 3 }, []byte {1 , 2 , 3 }, true },
11161131 {[]MyByte {1 , 2 , 3 }, []MyByte {1 , 2 , 3 }, true },
11171132 {MyBytes {1 , 2 , 3 }, MyBytes {1 , 2 , 3 }, true },
1133+ {map [deepEqualInterface ]string {deepEqualConcrete1 : "a" }, map [deepEqualInterface ]string {deepEqualConcrete1 : "a" }, true },
11181134
11191135 // Inequalities
11201136 {1 , 2 , false },
@@ -1136,6 +1152,7 @@ var deepEqualTests = []DeepEqualTest{
11361152 {fn3 , fn3 , false },
11371153 {[][]int {{1 }}, [][]int {{2 }}, false },
11381154 {& structWithSelfPtr {p : & structWithSelfPtr {s : "a" }}, & structWithSelfPtr {p : & structWithSelfPtr {s : "b" }}, false },
1155+ {map [deepEqualInterface ]string {deepEqualConcrete1 : "a" }, map [deepEqualInterface ]string {deepEqualConcrete2 : "a" }, false },
11391156
11401157 // Fun with floating point.
11411158 {math .NaN (), math .NaN (), false },
0 commit comments