From d7f7df1d5763e70735b24addf1e44b05a90ec690 Mon Sep 17 00:00:00 2001 From: Nishanth Shanmugham Date: Sun, 27 Nov 2022 15:37:30 +0530 Subject: [PATCH] assign a=false, not all=false (same effect but more appropriate) --- common_go118.go | 4 ++-- exhaustive.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common_go118.go b/common_go118.go index 6c46fb9..f7b3dfe 100644 --- a/common_go118.go +++ b/common_go118.go @@ -62,7 +62,7 @@ func fromInterface(pass *analysis.Pass, intf *types.Interface, typeparam bool) ( r, a := fromType(pass, u.Term(i).Type(), typeparam) for _, rr := range r { if !sameBasicKind(rr.et.TypeName.Type()) { - all = false + a = false break } } @@ -74,7 +74,7 @@ func fromInterface(pass *analysis.Pass, intf *types.Interface, typeparam bool) ( r, a := fromNamed(pass, embed.(*types.Named), typeparam) for _, rr := range r { if !sameBasicKind(rr.et.TypeName.Type()) { - all = false + a = false break } } diff --git a/exhaustive.go b/exhaustive.go index 6bcb0dc..da2262a 100644 --- a/exhaustive.go +++ b/exhaustive.go @@ -10,11 +10,11 @@ The Go [language spec] does not provide an explicit definition for enums. For the purpose of this analyzer, and by convention, an enum type is any named type that: - 1. has underlying type float, string, or integer (includes byte and + - has underlying type float, string, or integer (includes byte and rune, which are aliases for uint8 and int32, respectively); and - 2. has at least one constant of the type defined in the same scope. + - has at least one constant of the type defined in the same scope. -In the example below, Biome is an enum type. The 3 constants are its +In the example below, Biome is an enum type. The three constants are its enum members. package eco