| package a |
| |
| import "fmt" |
| |
| func Random() int { |
| y := 6 + 7 |
| return y |
| } |
| |
| func Random2(y int) int { //@rename("y", "z") |
| return y |
| } |
| |
| type Pos struct { |
| x, y int |
| } |
| |
| func (p *Pos) Sum() int { |
| return p.x + p.y //@rename("x", "myX") |
| } |
| |
| func _() { |
| var p Pos //@rename("p", "pos") |
| _ = p.Sum() //@rename("Sum", "GetSum") |
| } |
| |
| func sw() { |
| var x interface{} |
| |
| switch y := x.(type) { //@rename("y", "y0") |
| case int: |
| fmt.Printf("%d", y) //@rename("y", "y1") |
| case string: |
| fmt.Printf("%s", y) //@rename("y", "y2") |
| default: |
| fmt.Printf("%v", y) //@rename("y", "y3") |
| } |
| } |