You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var m = map[string]any{
"foo": &FooImpl{},
}
program, err := expr.Compile(`foo.Add(1, nil)`)
require.NoError(t, err)
_, err = expr.Run(program, m)
require.NoError(t, err)
}
`
return with error Call using interface {} as type *int (1:5)
The text was updated successfully, but these errors were encountered:
wodeqiangne
changed the title
pass nil to interface method get runtime error
pass nil to interface method get runtime error "Call using interface {} as type *int (1:5)"
Jul 23, 2024
`type Foo interface {
Add(a int, b *int)
}
type FooImpl struct {
}
func (*FooImpl) Add(a int, b *int) {
return
}
func TestNoInterfaceMethodWithNil(t *testing.T) {
}
`
return with error Call using interface {} as type *int (1:5)
The text was updated successfully, but these errors were encountered: