Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ClosureCallArgs6 (0.25 sec)

  1. test/escape_closure.go

    	// can tell that p flows directly to sink, but it's a little weird. Re-evaluate.
    	sink = func(p *int) *int { // ERROR "leaking param: p" "func literal does not escape"
    		return p
    	}(&x)
    }
    
    func ClosureCallArgs6() {
    	x := 0         // ERROR "moved to heap: x"
    	func(p *int) { // ERROR "moved to heap: p" "func literal does not escape"
    		sink = &p
    	}(&x)
    }
    
    func ClosureCallArgs7() {
    	var pp *int
    	for {
    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