New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkCondition should handle []interface{} for intersect operations #3718

moorereason opened this Issue Jul 19, 2017 · 0 comments


None yet
1 participant

moorereason commented Jul 19, 2017

The following new test cases fail in TestCheckCondition:

{reflect.ValueOf([]interface{}{"a"}), reflect.ValueOf([]string{"a", "b"}), "intersect", expect{true, false}},
{reflect.ValueOf([]string{"a"}), reflect.ValueOf([]interface{}{"a", "b"}), "intersect", expect{true, false}},

The issue is that checkCondition only sets slv and slmv (L106) if v and mv are of the same type (L85); therefore, the eventual call to ns.Intersect (L205) is made with two nil params.

See discussion thread for use case and rationale:

Test site from @budparr:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment