- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 4,191 for switchn (0.16 sec)
-
src/cmd/compile/internal/syntax/testdata/fallthrough.go
fallthrough // ERROR cannot fallthrough final case in switch } fallthrough // ERROR fallthrough statement out of place if true { fallthrough // ERROR fallthrough statement out of place } for { fallthrough // ERROR fallthrough statement out of place } var t any switch t.(type) { case int: fallthrough // ERROR cannot fallthrough in type switch }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Jun 26 00:21:29 UTC 2022 - 946 bytes - Viewed (0) -
test/fixedbugs/issue19679.go
// Used to crash when a type switch was present in dead code // in an inlineable function. package p func Then() { var i interface{} if false { switch i.(type) { } } } func Else() { var i interface{} if true { _ = i } else { switch i.(type) { } } } func Switch() { var i interface{} switch 5 { case 3: switch i.(type) { }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 24 17:21:05 UTC 2017 - 536 bytes - Viewed (0) -
test/typeswitch3.go
var r io.Reader _, _ = r.(io.Writer) switch r.(type) { case io.Writer: } // Issue 2827. switch _ := r.(type) { // ERROR "invalid variable name _|no new variables?" } } func noninterface() { var i int switch i.(type) { // ERROR "cannot type switch on non-interface value|not an interface" case string: case int: } type S struct { name string }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 12 22:20:51 UTC 2021 - 999 bytes - Viewed (0) -
src/go/printer/testdata/statements.input
if x:=expr; expr {use(x)} } // Formatting of switch-statement headers. func _() { switch {} switch;{} // no semicolon printed switch expr {} switch;expr{} // no semicolon printed switch (expr) {} // no parens printed switch;((expr)){} // no semicolon and parens printed switch x := expr; { default:use( x) } switch x := expr; expr {default:use(x)} }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 08 04:08:51 UTC 2014 - 8.3K bytes - Viewed (0) -
src/internal/platform/supported.go
return false // platform unrecognized } platform := goos + "/" + goarch switch buildmode { case "archive": return true case "c-archive": switch goos { case "aix", "darwin", "ios", "windows": return true case "linux": switch goarch { case "386", "amd64", "arm", "armbe", "arm64", "arm64be", "loong64", "ppc64le", "riscv64", "s390x":
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat May 04 07:50:22 UTC 2024 - 7.6K bytes - Viewed (0) -
src/internal/types/testdata/check/stmt1.go
switch x { case 0: return case 1: break } } /* ERROR "missing return" */ func _(x, y int) (z int) { switch x { case 0: return default: switch y { case 0: break } panic(0) } } func _(x, y int) (z int) { switch x { case 0: return default: switch y { case 0: break } panic(0); ; ; } ; } func _(x, y int) (z int) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 02 02:58:32 UTC 2022 - 3.3K bytes - Viewed (0) -
pkg/config/protocol/instance.go
func (i Instance) IsTLS() bool { switch i { case HTTPS, TLS: return true default: return false } } // IsHTTPS is true if protocol is HTTPS func (i Instance) IsHTTPS() bool { switch i { case HTTPS: return true default: return false } } // IsGRPC is true for GRPC protocols. func (i Instance) IsGRPC() bool { switch i { case GRPC, GRPCWeb: return true
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Aug 01 02:46:15 UTC 2023 - 4.3K bytes - Viewed (0) -
src/go/types/stmt.go
case token.FALLTHROUGH: if ctxt&fallthroughOk == 0 { var msg string switch { case ctxt&finalSwitchCase != 0: msg = "cannot fallthrough final case in switch" case ctxt&inTypeSwitch != 0: msg = "cannot fallthrough in type switch" default: msg = "fallthrough statement out of place" } check.error(s, MisplacedFallthrough, msg) } default:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 30.6K bytes - Viewed (0) -
test/fixedbugs/issue53635.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jul 08 12:57:49 UTC 2022 - 423 bytes - Viewed (0) -
src/cmd/compile/internal/test/testdata/break_test.go
var n int switch g { case 0: n = 1 switch h { case 0: n += 10 break } n = 2 } return n } func switchLabeledInner_ssa() int { var n int switch g { case 0: n = 1 Done: switch h { case 0: n += 10 break Done } n = 2 } return n } func switchLabeledOuter_ssa() int { var n int
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 23 06:40:04 UTC 2020 - 3.7K bytes - Viewed (0)