
When casting an integer into a struct pointer we make a fake pointer variable that doesn't have an address, maybeDereference and structMember should still work on this kind of Variable. Fixes #1432
17 lines
151 B
Go
17 lines
151 B
Go
package main
|
|
|
|
import "runtime"
|
|
|
|
type s struct {
|
|
i int64
|
|
}
|
|
|
|
func main() {
|
|
i := 1
|
|
p := &i
|
|
s := s{i: 1}
|
|
_ = s
|
|
runtime.Breakpoint()
|
|
println(i, p)
|
|
}
|