Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 2,044 for IsSwitch (0.16 sec)

  1. src/vendor/golang.org/x/sys/cpu/cpu_arm64.go

    	}
    
    	switch extractBits(isar0, 16, 19) {
    	case 1:
    		ARM64.HasCRC32 = true
    	}
    
    	switch extractBits(isar0, 20, 23) {
    	case 2:
    		ARM64.HasATOMICS = true
    	}
    
    	switch extractBits(isar0, 28, 31) {
    	case 1:
    		ARM64.HasASIMDRDM = true
    	}
    
    	switch extractBits(isar0, 32, 35) {
    	case 1:
    		ARM64.HasSHA3 = true
    	}
    
    	switch extractBits(isar0, 36, 39) {
    	case 1:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 16:12:58 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  2. test/fixedbugs/issue9608.dir/issue9608.go

    		fail()
    	}
    }
    
    // Test dead code elimination in ordinary switch statements
    func init() {
    	const x = 0
    	switch x {
    	case 1:
    		fail()
    	}
    
    	switch 1 {
    	case x:
    		fail()
    	}
    
    	switch {
    	case false:
    		fail()
    	}
    
    	const a = "a"
    	switch a {
    	case "b":
    		fail()
    	}
    
    	const snowman = '☃'
    	switch snowman {
    	case '☀':
    		fail()
    	}
    
    	const zero = float64(0.0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 23 05:12:39 UTC 2016
    - 1K bytes
    - Viewed (0)
  3. test/switch6.go

    func f1(e interface{}) {
    	switch e {
    	default:
    	default: // ERROR "multiple defaults( in switch)?"
    	}
    	switch e.(type) {
    	default:
    	default: // ERROR "multiple defaults( in switch)?"
    	}
    }
    
    type I interface {
    	Foo()
    }
    
    type X int
    
    func (*X) Foo() {}
    func f2() {
    	var i I
    	switch i.(type) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 24 17:04:15 UTC 2022
    - 1.1K bytes
    - Viewed (0)
  4. test/fixedbugs/issue15898.go

    package p
    
    func f(e interface{}) {
    	switch e.(type) {
    	case nil, nil: // ERROR "multiple nil cases in type switch|duplicate type in switch|duplicate case nil in type switch"
    	}
    
    	switch e.(type) {
    	case nil:
    	case nil: // ERROR "multiple nil cases in type switch|duplicate type in switch|duplicate case nil in type switch"
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 22 17:50:13 UTC 2020
    - 503 bytes
    - Viewed (0)
  5. test/switch2.go

    // Verify that erroneous switch statements are detected by the compiler.
    // Does not compile.
    
    package main
    
    func f() {
    	switch {
    	case 0; // ERROR "expecting := or = or : or comma|expected :"
    	}
    
    	switch {
    	case 0; // ERROR "expecting := or = or : or comma|expected :"
    	default:
    	}
    
    	switch {
    	case 0: case 0: default:
    	}
    
    	switch {
    	case 0: f(); case 0:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 01 22:37:04 UTC 2022
    - 775 bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/tests/legalize_tfg_with_control_flow.mlir

        %LoopCond, %ctl_6 = LoopCond(%Less) name("while/LoopCond") : (tensor<*xi1>) -> (tensor<*xi1>)
        %Switch:2, %ctl_7 = Switch(%Merge#0, %LoopCond) name("while/Switch") {T = i32, _class = ["loc:@while/Merge"]} : (tensor<*xi32>, tensor<*xi1>) -> (tensor<*xi32>, tensor<*xi32>)
        %Identity, %ctl_8 = Identity(%Switch#1) name("while/Identity") {T = i32} : (tensor<*xi32>) -> (tensor<*xi32>)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 06 18:31:38 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  7. test/typeswitch.go

    		}
    	}
    
    	// boolean switch (has had bugs in past; worth writing down)
    	switch {
    	case true:
    		assert(true, "switch 2 bool")
    	default:
    		assert(false, "switch 2 unknown")
    	}
    
    	switch true {
    	case true:
    		assert(true, "switch 3 bool")
    	default:
    		assert(false, "switch 3 unknown")
    	}
    
    	switch false {
    	case false:
    		assert(true, "switch 4 bool")
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 24 00:48:19 UTC 2012
    - 1.8K bytes
    - Viewed (0)
  8. test/fixedbugs/bug128.go

    package main
    func main() {
    	switch {
    		// empty switch is allowed according to syntax
    		// unclear why it shouldn't be allowed
    	}
    	switch tag := 0; tag {
    		// empty switch is allowed according to syntax
    		// unclear why it shouldn't be allowed
    	}
    }
    
    /*
    uetli:~/Source/go1/test/bugs gri$ 6g bug127.go 
    bug127.go:5: switch statement must have case labels
    bug127.go:9: switch statement must have case labels
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Feb 18 21:15:42 UTC 2012
    - 576 bytes
    - Viewed (0)
  9. pkg/client/conditions/conditions.go

    func PodRunning(event watch.Event) (bool, error) {
    	switch event.Type {
    	case watch.Deleted:
    		return false, errors.NewNotFound(schema.GroupResource{Resource: "pods"}, "")
    	}
    	switch t := event.Object.(type) {
    	case *v1.Pod:
    		switch t.Status.Phase {
    		case v1.PodRunning:
    			return true, nil
    		case v1.PodFailed, v1.PodSucceeded:
    			return false, ErrPodCompleted
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 16 13:43:36 UTC 2023
    - 2K bytes
    - Viewed (0)
  10. src/vendor/golang.org/x/net/nettest/nettest.go

    	ss := strings.Split(network, ":")
    	switch ss[0] {
    	case "ip+nopriv":
    		// This is an internal network name for testing on the
    		// package net of the standard library.
    		switch runtime.GOOS {
    		case "android", "fuchsia", "hurd", "ios", "js", "nacl", "plan9", "wasip1", "windows":
    			return false
    		}
    	case "ip", "ip4", "ip6":
    		switch runtime.GOOS {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 8.5K bytes
    - Viewed (0)
Back to top