Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ClosureIndirect2 (0.11 sec)

  1. test/escape_closure.go

    	g := f
    	g(new(int)) // ERROR "new\(int\) does not escape"
    
    	h := nopFunc
    	h(new(int)) // ERROR "new\(int\) does not escape"
    }
    
    func nopFunc(p *int) {} // ERROR "p does not escape"
    
    func ClosureIndirect2() {
    	f := func(p *int) *int { return p } // ERROR "leaking param: p to result ~r0 level=0" "func literal does not escape"
    
    	f(new(int)) // ERROR "new\(int\) does not escape"
    
    	g := f
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 17 16:36:09 UTC 2023
    - 4.6K bytes
    - Viewed (0)
Back to top