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

Feature: Added support for implicit type conversions #166

Merged
merged 5 commits into from
May 26, 2018

Conversation

arjenvrh
Copy link
Contributor

Added support for implicit type conversions (i.e. a class defines an implicit casting operator to the type of a ConstantExpression).

public class ImplicitCastingClass
{
    public Guid Id { get; set; }
    public static implicit operator Guid(ImplicitCastingClass id)
    {
        return id.Id;
    }
}

@codecov
Copy link

codecov bot commented May 15, 2018

Codecov Report

Merging #166 into master will increase coverage by 0.26%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #166      +/-   ##
==========================================
+ Coverage   82.38%   82.64%   +0.26%     
==========================================
  Files          37       37              
  Lines        3627     3642      +15     
  Branches      488      491       +3     
==========================================
+ Hits         2988     3010      +22     
  Misses        501      501              
+ Partials      138      131       -7
Impacted Files Coverage Δ
...ystem.Linq.Dynamic.Core/Parser/ExpressionParser.cs 77.79% <100%> (+0.45%) ⬆️
src/System.Linq.Dynamic.Core/Parser/TypeHelper.cs 88.2% <0%> (+0.47%) ⬆️
...c/System.Linq.Dynamic.Core/Tokenizer/TextParser.cs 98.03% <0%> (+1.3%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7cdd1a...d2c635b. Read the comment docs.

@StefH StefH self-requested a review May 15, 2018 10:47
Copy link
Collaborator

@StefH StefH left a comment

Choose a reason for hiding this comment

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

Can you also add some unit-test to cover this new code?

@arjenvrh arjenvrh changed the title Update ExpressionParser.cs Added support for implicit type conversions May 16, 2018
@StefH StefH changed the title Added support for implicit type conversions Feature: Added support for implicit type conversions May 21, 2018
@StefH StefH merged commit 12704c2 into zzzprojects:master May 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants