Skip to content

Conversation

@blotus
Copy link
Contributor

@blotus blotus commented Mar 9, 2023

Fixes #346.

I'm not familiar enough with expr internals to know if this fixes the issue or hides the underlying cause.

Feel free to close it if you have a better solution.

method := v.MethodByName(i.(string))
if method.IsValid() {
return method.Interface()
if methodName, ok := i.(string); ok {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is the right solution 👍🏻

@antonmedv antonmedv merged commit 5613693 into expr-lang:master Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

interface conversion: interface {} is int, not string when trying to index slice type

2 participants