Skip to content
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

Failed to compare text samples #65

Open
tmteam opened this issue Feb 5, 2023 · 0 comments
Open

Failed to compare text samples #65

tmteam opened this issue Feb 5, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@tmteam
Copy link
Owner

tmteam commented Feb 5, 2023

[TestCase("'avatar'.reverse() >  reverse('avatar') ", false)]
[TestCase("('avatar'.reverse()) >  reverse('avatar') ", false)]
[TestCase("'avatar'.reverse() <  'avatar'", false)]
public void ConstantEquation(string expr, bool expected)
    => expr.AssertReturns("out", expected);

Causes

System.InvalidCastException : Unable to cast object of type 'NFun.Runtime.Arrays.EnumerableFunnyArray' to type 'System.IComparable'.
   at NFun.Functions.LessFunction.Calc(Object arg1, Object arg2) in /Users/Iurii.Sukhanov/Code/NFun/src/NFun/Functions/ComparationFunctions.cs:line 52
   at NFun.Interpretation.Functions.GenericFunctionWithTwoArguments.ConcreteImplementationWithTwoArgs.Calc(Object a, Object b) in /Users/Iurii.Sukhanov/Code/NFun/src/NFun/Interpretation/Functions/GenericFunctionWithTwoArguments.cs:line 39
   at NFun.Interpretation.Nodes.FunOfTwoArgsExpressionNode.Calc() in /Users/Iurii.Sukhanov/Code/NFun/src/NFun/Interpretation/Nodes/FunOfTwoArgsExpressionNode.cs:line 25
@tmteam tmteam added the bug Something isn't working label Feb 5, 2023
@tmteam tmteam self-assigned this Feb 5, 2023
tmteam added a commit that referenced this issue Jun 17, 2023
tmteam added a commit that referenced this issue Jul 1, 2023
tmteam added a commit that referenced this issue Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant