Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 2,058 for switch3 (0.11 sec)

  1. 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)
  2. src/internal/cpu/cpu_arm64.go

    }
    
    func parseARM64SystemRegisters(isar0 uint64) {
    	// ID_AA64ISAR0_EL1
    	switch extractBits(isar0, 4, 7) {
    	case 1:
    		ARM64.HasAES = true
    	case 2:
    		ARM64.HasAES = true
    		ARM64.HasPMULL = true
    	}
    
    	switch extractBits(isar0, 8, 11) {
    	case 1:
    		ARM64.HasSHA1 = true
    	}
    
    	switch extractBits(isar0, 12, 15) {
    	case 1:
    		ARM64.HasSHA2 = true
    	case 2:
    		ARM64.HasSHA2 = true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 25 14:08:20 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. test/fixedbugs/issue53635.go

    // license that can be found in the LICENSE file.
    
    package main
    
    func main() {
    	f[int]()
    }
    
    func f[T any]() {
    	switch []T(nil) {
    	case nil:
    	default:
    		panic("FAIL")
    	}
    
    	switch (func() T)(nil) {
    	case nil:
    	default:
    		panic("FAIL")
    	}
    
    	switch (map[int]T)(nil) {
    	case nil:
    	default:
    		panic("FAIL")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 08 12:57:49 UTC 2022
    - 423 bytes
    - Viewed (0)
  10. 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)
Back to top