Skip to content

Failed to compare text samples #65

Open
@tmteam

Description

@tmteam
[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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions