- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 3,443 for switch3 (0.18 sec)
-
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/bug373.go
// Issue 873, 2162 package foo func f(x interface{}) { switch t := x.(type) { // ERROR "declared and not used" case int: } } func g(x interface{}) { switch t := x.(type) { case int: case float32: println(t) } } func h(x interface{}) { switch t := x.(type) { case int: case float32: default: println(t) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 27 21:10:19 UTC 2022 - 502 bytes - Viewed (0) -
test/fixedbugs/issue20185.go
// caused an internal compiler error. package p func F() { switch t := nil.(type) { // ERROR "cannot type switch on non-interface value|not an interface" default: _ = t } } const x = 1 func G() { switch t := x.(type) { // ERROR "cannot type switch on non-interface value|declared and not used|not an interface" default: }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 27 21:10:19 UTC 2022 - 581 bytes - Viewed (0) -
src/net/platform_test.go
func testableNetwork(network string) bool { net, _, _ := strings.Cut(network, ":") switch net { case "ip+nopriv": case "ip", "ip4", "ip6": switch runtime.GOOS { case "plan9": return false default: if os.Getuid() != 0 { return false } } case "unix", "unixgram": switch runtime.GOOS { case "android", "ios", "plan9", "windows": return false case "aix":
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 4.3K bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue42758.go
package p func _[T any](x interface{}){ switch x.(type) { case T: // ok to use a type parameter case int: } switch x.(type) { case T: case T /* ERROR "duplicate case" */ : } } type constraint interface { ~int } func _[T constraint](x interface{}){ switch x.(type) { case T: // ok to use a type parameter even if type set contains int case int:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:25 UTC 2023 - 649 bytes - Viewed (0) -
src/math/cmplx/sin.go
// Also tested by csin(casin(z)) = z. // Sin returns the sine of x. func Sin(x complex128) complex128 { switch re, im := real(x), imag(x); { case im == 0 && (math.IsInf(re, 0) || math.IsNaN(re)): return complex(math.NaN(), im) case math.IsInf(im, 0): switch { case re == 0: return x case math.IsInf(re, 0) || math.IsNaN(re): return complex(math.NaN(), im) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 18 17:59:44 UTC 2022 - 4.8K bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue50965.go
// license that can be found in the LICENSE file. package p func _(x int, c string) { switch x { case c /* ERROR "invalid case c in switch on x (mismatched types string and int)" */ : } } func _(x, c []int) { switch x { case c /* ERROR "invalid case c in switch on x (slice can only be compared to nil)" */ : }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:27 UTC 2023 - 431 bytes - Viewed (0) -
src/net/error_test.go
if nestedErr == nil { return nil } switch err := nestedErr.(type) { case *OpError: if err := err.isValid(); err != nil { return err } nestedErr = err.Err goto second } return fmt.Errorf("unexpected type on 1st nested level: %T", nestedErr) second: if isPlatformError(nestedErr) { return nil } switch err := nestedErr.(type) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 20.3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/arch/x86/x86asm/gnu.go
found := false for i := len(inst.Prefix) - 1; i >= 0; i-- { switch inst.Prefix[i] & 0xFF { case 0xF3: if !found { found = true inst.Prefix[i] |= PrefixImplicit } case 0xF2: inst.Prefix[i] &^= PrefixImplicit } } inst.Op = MOVNTSS } } // Add implicit arguments. switch inst.Op { case MONITOR: inst.Args[0] = EDX inst.Args[1] = ECX
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 21.4K bytes - Viewed (0) -
platforms/core-configuration/configuration-cache/src/integTest/groovy/org/gradle/internal/cc/impl/fixtures/BuildLogicChangeFixture.groovy
} """ writeBuildLogicPlugin() writeGreetTask "GreetTask", ORIGINAL_GREETING switch (kind) { case Kind.CHANGE_RESOURCE: writeResource "" break } } void applyChange() { switch (kind) { case Kind.CHANGE_SOURCE: writeGreetTask "GreetTask", CHANGED_GREETING break
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Sat Jun 08 11:29:25 UTC 2024 - 7.2K bytes - Viewed (0)