delve/_fixtures/doubleinline.go
Derek Parker 8ddb64c808
pkg/proc: handle double inlined calls (#2880)
It's possible that an inlined function call also contains an inlined
sunroutine. In this case we should also parse the children of
inlined calls to ensure we don't lose this information.
2022-01-24 08:56:37 +01:00

27 lines
362 B
Go

package main
import (
"fmt"
"runtime"
"strconv"
)
type Rectangle struct{}
func (r *Rectangle) Height() int {
h, _ := strconv.ParseInt("7", 10, 0)
return int(h)
}
func (r *Rectangle) Width() int {
return 6
}
func (r *Rectangle) Area() int { return r.Height() * r.Width() }
func main() {
var r Rectangle
runtime.Breakpoint()
fmt.Println(r.Area())
}