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

[Bug] ParseIntegerLiteral Int16 #90

Closed
peterjanto opened this issue Jun 22, 2017 · 1 comment
Closed

[Bug] ParseIntegerLiteral Int16 #90

peterjanto opened this issue Jun 22, 2017 · 1 comment
Assignees
Labels

Comments

@peterjanto
Copy link

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

@StefH StefH changed the title ParseIntegerLiteral Int16 [Bug] ParseIntegerLiteral Int16 Jun 22, 2017
@StefH StefH self-assigned this Jun 22, 2017
@StefH StefH added the bug label Jun 22, 2017
StefH added a commit that referenced this issue Jun 22, 2017
StefH added a commit that referenced this issue Jun 22, 2017
@StefH
Copy link
Collaborator

StefH commented Jun 23, 2017

Your proposed code change broke some unit-tests, so I did fix this problem in another piece of code.

Please take a look.

@StefH StefH closed this as completed Jun 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants