Skip to content

[Bug] ParseIntegerLiteral Int16 #90

Closed
@peterjanto

Description

Hello,
Thank you for the library but i have a following problem

Sample:
var list = new short[] { 1, 2, 3, 4, 5, 6, 7 };
var result= list.AsQueryable().Where("it in (1,2)");

This code is not working and throwing error System.Linq.Dynamic.Core.Exceptions.ParseException: 'Expression of type 'System.Int16' expected'

This problem might be solved like this:
if (value <= (int)short.MaxValue) return CreateLiteral((short)value, text);

in ExpressionParse.cs function Expression ParseIntegerLiteral()

P

Metadata

Assignees

Labels

Type

No type

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions