From 4e03e87547853523d4ff941935a6ef1712518c61 Mon Sep 17 00:00:00 2001 From: Adin Scannell Date: Tue, 12 Jan 2021 12:36:17 -0800 Subject: Fix simple mistakes identified by goreportcard. These are primarily simplification and lint mistakes. However, minor fixes are also included and tests added where appropriate. PiperOrigin-RevId: 351425971 --- tools/go_generics/tests/all_stmts/input.go | 2 ++ tools/go_generics/tests/all_stmts/output.go | 2 ++ tools/go_generics/tests/all_types/lib/lib.go | 1 + 3 files changed, 5 insertions(+) (limited to 'tools/go_generics/tests') diff --git a/tools/go_generics/tests/all_stmts/input.go b/tools/go_generics/tests/all_stmts/input.go index 4791d1ff1..7ebe7c40e 100644 --- a/tools/go_generics/tests/all_stmts/input.go +++ b/tools/go_generics/tests/all_stmts/input.go @@ -118,8 +118,10 @@ R: _ = v } else if T := T(0); T != 1 { T++ + _ = T } else { T-- + _ = T } if a := T(0); a != T(1) { diff --git a/tools/go_generics/tests/all_stmts/output.go b/tools/go_generics/tests/all_stmts/output.go index a53d84535..a33944d85 100644 --- a/tools/go_generics/tests/all_stmts/output.go +++ b/tools/go_generics/tests/all_stmts/output.go @@ -116,8 +116,10 @@ R: _ = v } else if T := Q(0); T != 1 { T++ + _ = T } else { T-- + _ = T } if a := Q(0); a != Q(1) { diff --git a/tools/go_generics/tests/all_types/lib/lib.go b/tools/go_generics/tests/all_types/lib/lib.go index 988786496..99edb371f 100644 --- a/tools/go_generics/tests/all_types/lib/lib.go +++ b/tools/go_generics/tests/all_types/lib/lib.go @@ -14,4 +14,5 @@ package lib +// T is a test type. type T int32 -- cgit v1.2.3