go/types: simplify some internal code

Change-Id: Ia32d40cc272cb049c0a7c9d5f8ef4329bdefc7fe
Reviewed-on: https://go-review.googlesource.com/135699
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
diff --git a/src/go/types/decl.go b/src/go/types/decl.go
index e248aab..0ff1fb0 100644
--- a/src/go/types/decl.go
+++ b/src/go/types/decl.go
@@ -140,20 +140,12 @@
 		// order code.
 		switch obj := obj.(type) {
 		case *Const:
-			if check.typeCycle(obj) {
-				obj.typ = Typ[Invalid]
-				break
-			}
-			if obj.typ == nil {
+			if check.typeCycle(obj) || obj.typ == nil {
 				obj.typ = Typ[Invalid]
 			}
 
 		case *Var:
-			if check.typeCycle(obj) {
-				obj.typ = Typ[Invalid]
-				break
-			}
-			if obj.typ == nil {
+			if check.typeCycle(obj) || obj.typ == nil {
 				obj.typ = Typ[Invalid]
 			}