diff --git a/instrumenter.go b/instrumenter.go index 1a16cff..a52267b 100644 --- a/instrumenter.go +++ b/instrumenter.go @@ -522,7 +522,7 @@ func needsParenthesesForEql(expr ast.Expr) bool { *ast.ArrayType, *ast.StructType, *ast.FuncType, - // TODO: *ast.InterfaceType, + *ast.InterfaceType, *ast.MapType, *ast.ChanType: return false diff --git a/testdata/instrumenter/TypeSwitchStmt.gobco b/testdata/instrumenter/TypeSwitchStmt.gobco index bf9f20d..8c475ee 100644 --- a/testdata/instrumenter/TypeSwitchStmt.gobco +++ b/testdata/instrumenter/TypeSwitchStmt.gobco @@ -252,7 +252,7 @@ func typeSwitchStmtMixed(value interface{}) { // :95:7: "value.(type) == []int" // :98:7: "value.(type) == struct{ field int }" // :101:7: "value.(type) == func(int) int" -// :104:7: "value.(type) == (interface{ ReadByte() (byte, error) })" +// :104:7: "value.(type) == interface{ ReadByte() (byte, error) }" // :107:7: "value.(type) == map[int]int" // :110:7: "value.(type) == chan int" // :113:7: "value.(type) == *int"