Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ClosureCallArgs0 (0.31 sec)

  1. test/escape_closure.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Test escape analysis for closure arguments.
    
    package escape
    
    var sink interface{}
    
    func ClosureCallArgs0() {
    	x := 0
    	func(p *int) { // ERROR "p does not escape" "func literal does not escape"
    		*p = 1
    	}(&x)
    }
    
    func ClosureCallArgs1() {
    	x := 0
    	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