• Robert Griesemer's avatar
    spec: clarify what is considered a function call for len/cap special case · 87169813
    Robert Griesemer authored
    gccgo considers built-in function calls returning a constant not as function call (issue 7386)
    go/types considers any call (regular or built-in) as a function call
    
    The wording and examples clarify that only "function calls" that are issued
    at run-time (and thus do not result in a constant result) are considered
    function calls in this case.
    
    gc is inconsistent (issue 7385)
    gccgo already interprets the spec accordingly and issue 7386 is moot.
    go/types considers all calls (constant or not) as function calls (issue 7457).
    
    Fixes #7387.
    Fixes #7386.
    
    LGTM=r, rsc, iant
    R=r, rsc, iant, ken
    CC=golang-codereviews
    https://golang.org/cl/66860046
    87169813
go_spec.html 182 KB