Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 183 for switches$ (0.72 sec)

  1. src/cmd/gofmt/testdata/typeswitch.input

    /*
    Parenthesized type switch expressions originally
    accepted by gofmt must continue to be rewritten
    into the correct unparenthesized form.
    
    Only type-switches that didn't declare a variable
    in the type switch type assertion and which
    contained only "expression-like" (named) types in their
    cases were permitted to have their type assertion parenthesized
    by go/parser (due to a weak predicate in the parser). All others
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 15 17:17:30 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  2. src/cmd/gofmt/testdata/typeswitch.golden

    /*
    Parenthesized type switch expressions originally
    accepted by gofmt must continue to be rewritten
    into the correct unparenthesized form.
    
    Only type-switches that didn't declare a variable
    in the type switch type assertion and which
    contained only "expression-like" (named) types in their
    cases were permitted to have their type assertion parenthesized
    by go/parser (due to a weak predicate in the parser). All others
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 15 17:17:30 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  3. src/cmd/go/internal/toolchain/switch.go

    // Otherwise Switch prints all the errors using base.Error.
    //
    // See https://go.dev/doc/toolchain#switch.
    type Switcher struct {
    	TooNew *gover.TooNewError // max go requirement observed
    	Errors []error            // errors collected so far
    }
    
    // Error reports the error to the Switcher,
    // which saves it for processing during Switch.
    func (s *Switcher) Error(err error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 18:15:22 UTC 2024
    - 7K bytes
    - Viewed (0)
  4. test/fixedbugs/issue37837.dir/b.go

    func main() {
    	// Test that inlined type switches without short variable
    	// declarations work correctly.
    	check(0, a.F(nil)) // ERROR "inlining call to a.F"
    	check(1, a.F(0))   // ERROR "inlining call to a.F" "does not escape"
    	check(2, a.F(0.0)) // ERROR "inlining call to a.F" "does not escape"
    	check(3, a.F(""))  // ERROR "inlining call to a.F" "does not escape"
    
    	// Test that inlined type switches with short variable
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 06 20:49:11 UTC 2020
    - 1.3K bytes
    - Viewed (0)
  5. src/runtime/coro.go

    	mcall(coroswitch_m)
    }
    
    //go:linkname coroswitch
    
    // coroswitch switches to the goroutine blocked on c
    // and then blocks the current goroutine on c.
    func coroswitch(c *coro) {
    	gp := getg()
    	gp.coroarg = c
    	mcall(coroswitch_m)
    }
    
    // coroswitch_m is the implementation of coroswitch
    // that runs on the m stack.
    //
    // Note: Coroutine switches are expected to happen at
    // an order of magnitude (or more) higher frequency
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:09:18 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  6. tools/bug-report/pkg/testdata/output/format_txt_with_time_filter.log

    2020-06-29T23:37:27.336155Z	info	Channel switches to new LB policy "pick_first"
    2020-06-29T23:37:27.336189Z	info	Subchannel Connectivity change to CONNECTING
    2020-06-29T23:37:27.336222Z	info	Starting gateway SDS
    2020-06-29T23:37:27.336491Z	info	pickfirstBalancer: HandleSubConnStateChange: 0xc00087d1e0, {CONNECTING <nil>}
    2020-06-29T23:37:27.336645Z	info	Channel Connectivity change to CONNECTING
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 19 21:44:33 UTC 2023
    - 578 bytes
    - Viewed (0)
  7. test/typeswitch2.go

    // errorcheck
    
    // Copyright 2009 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Verify that various erroneous type switches are caught by the compiler.
    // Does not compile.
    
    package main
    
    import "io"
    
    func whatis(x interface{}) string {
    	switch x.(type) {
    	case int:
    		return "int"
    	case int: // ERROR "duplicate"
    		return "int8"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 11 23:33:11 UTC 2019
    - 655 bytes
    - Viewed (0)
  8. test/typeswitch2b.go

    // errorcheck
    
    // Copyright 2019 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Verify that various erroneous type switches are caught by the compiler.
    // Does not compile.
    
    package main
    
    func notused(x interface{}) {
    	// The first t is in a different scope than the 2nd t; it cannot
    	// be accessed (=> declared and not used error); but it is legal
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 21:10:19 UTC 2022
    - 598 bytes
    - Viewed (0)
  9. tools/bug-report/pkg/testdata/input/format_txt.log

    2020-06-29T23:37:27.336149Z	info	ClientConn switching balancer to "pick_first"
    2020-06-29T23:37:27.336155Z	info	Channel switches to new LB policy "pick_first"
    2020-06-29T23:37:27.336189Z	info	Subchannel Connectivity change to CONNECTING
    2020-06-29T23:37:27.336222Z	info	Starting gateway SDS
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 19 21:44:33 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  10. test/codegen/switch.go

    		return "C"
    	// amd64: `CMPL\s\(.*\), \$1718907950$`
    	// arm64: `MOVD\s\$1718907950`, `CMPW\sR.*, R.*$`
    	case ".ttf":
    		return "D"
    	default:
    		return ""
    	}
    }
    
    // use jump tables for type switches to concrete types.
    func typeSwitch(x any) int {
    	// amd64:`JMP\s\(.*\)\(.*\)$`
    	// arm64:`MOVD\s\(R.*\)\(R.*<<3\)`,`JMP\s\(R.*\)$`
    	switch x.(type) {
    	case int:
    		return 0
    	case int8:
    		return 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 18:39:50 UTC 2023
    - 3.6K bytes
    - Viewed (0)
Back to top