| -- functionextraction_extract_args_returns_5_2 -- |
| package extract |
| |
| func _() { |
| a := 1 |
| //@mark(exSt0, "a") |
| a = newFunction(a) //@mark(exEn0, "2") |
| //@extractfunc(exSt0, exEn0) |
| b := a * 2 //@mark(exB, " b") |
| _ = 3 + 4 //@mark(exEnd, "4") |
| //@extractfunc(exB, exEnd) |
| } |
| |
| func newFunction(a int) int { |
| a = 5 |
| a = a + 2 |
| return a |
| } |
| |
| -- functionextraction_extract_args_returns_8_1 -- |
| package extract |
| |
| func _() { |
| a := 1 |
| a = 5 //@mark(exSt0, "a") |
| a = a + 2 //@mark(exEn0, "2") |
| //@extractfunc(exSt0, exEn0) |
| //@mark(exB, " b") |
| newFunction(a) //@mark(exEnd, "4") |
| //@extractfunc(exB, exEnd) |
| } |
| |
| func newFunction(a int) { |
| b := a * 2 |
| _ = 3 + 4 |
| } |
| |