Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for inlineClosure (0.12 sec)

  1. src/runtime/start_line_test.go

    }
    
    var closureFn func() int
    
    func normalClosure() int {
    	// Assign to global to ensure this isn't inlined.
    	closureFn = func() int {
    		return callerStartLine(false)
    	}
    	return closureFn()
    }
    
    func inlineClosure() int {
    	return func() int {
    		return callerStartLine(true)
    	}()
    }
    
    func TestStartLine(t *testing.T) {
    	// We test inlined vs non-inlined variants. We can't do that if
    	// optimizations are disabled.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 20 22:54:22 UTC 2023
    - 2.6K bytes
    - Viewed (0)
Back to top