| 1 |
Failures to inline because callee references a builtin that |
| 2 |
is shadowed by caller. |
| 3 |
|
| 4 |
-- go.mod -- |
| 5 |
module testdata |
| 6 |
go 1.18 |
| 7 |
|
| 8 |
-- a/nil.go -- |
| 9 |
package a |
| 10 |
|
| 11 |
func _() { |
| 12 |
const nil = 1 |
| 13 |
_ = f() //@ inline(re"f", re"nil.*shadowed.*by.*const.*line 4") |
| 14 |
} |
| 15 |
|
| 16 |
func f() *int { return nil } |
| 17 |
-- a/nil-type-param.go -- |
| 18 |
package a |
| 19 |
|
| 20 |
func _[nil any]() { |
| 21 |
_ = f() //@ inline(re"f", re"nil.*shadowed.*by.*typename.*line 3") |
| 22 |
} |
| 23 |
|
| 24 |
-- a/nil-typename.go -- |
| 25 |
package a |
| 26 |
|
| 27 |
func _[nil any]() { |
| 28 |
_ = f() //@ inline(re"f", re"nil.*shadowed.*by.*typename.*line 3") |
| 29 |
} |
| 30 |
|
| 31 |
-- a/append.go -- |
| 32 |
package a |
| 33 |
|
| 34 |
func _() { |
| 35 |
type append int |
| 36 |
g(nil) //@ inline(re"g", re"append.*shadowed.*by.*typename.*line 4") |
| 37 |
} |
| 38 |
|
| 39 |
func g(x []int) { _ = append(x, x...) } |
| 40 |
|
| 41 |
-- a/type.go -- |
| 42 |
package a |
| 43 |
|
| 44 |
func _() { |
| 45 |
type int uint8 |
| 46 |
_ = h(0) //@ inline(re"h", re"int.*shadowed.*by.*typename.*line 4") |
| 47 |
} |
| 48 |
|
| 49 |
func h(x int) int { return x + 1 } |