Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for switchConst1 (0.15 sec)

  1. test/inline.go

    // the case that matches. See issue 50253.
    func switchConst1(p func(string)) { // ERROR "can inline switchConst" "p does not escape"
    	const c = 1
    	switch c {
    	case 0:
    		p("zero")
    	case 1:
    		p("one")
    	case 2:
    		p("two")
    	default:
    		p("other")
    	}
    }
    
    func switchConst2() string { // ERROR "can inline switchConst2"
    	switch runtime.GOOS {
    	case "linux":
    		return "Leenooks"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 11.7K bytes
    - Viewed (0)
  2. test/newinline.go

    // the case that matches. See issue 50253.
    func switchConst1(p func(string)) { // ERROR "can inline switchConst" "p does not escape"
    	const c = 1
    	switch c {
    	case 0:
    		p("zero")
    	case 1:
    		p("one")
    	case 2:
    		p("two")
    	default:
    		p("other")
    	}
    }
    
    func switchConst2() string { // ERROR "can inline switchConst2"
    	switch runtime.GOOS {
    	case "linux":
    		return "Leenooks"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 20:15:25 UTC 2023
    - 11.2K bytes
    - Viewed (0)
Back to top