open2b/scriggo

"reflect: call of reflect.Value.Set on zero Value" instead of "nil panic" when accessing nil pointer

Opened this issue · 0 comments

This code:

package main

func main() {
	var p *int
	*p = 1
}

should panic with:

panic: runtime error: invalid memory address or nil pointer dereference

But instead it panics the reflect packages:

panic: reflect: call of reflect.Value.Set on zero Value

Not sure if this is somehow related to #921.