Skip to content

Type name matching does not seem to follow case sensitivity settings #947

Closed

Description

@glopesdev

Currently migrating from the old System.Linq.Dynamic to System.Linq.Dynamic.Core and found out that case-sensitivity does not seem to be applied the same way to type conversions. For example, the below parse statement will fail:

var expression = DynamicExpressionParser.ParseLambda(typeof(object), null, "int16(5)");

with the message "No applicable method 'int16' exists in type 'Object'".

In the old System.Linq.Dynamic this script used to work, and from exploring this new library it looks like the default should be to support case-insensitive matching as well.

I checked that method and property name matching seems to be case-insensitive, but for some reason type name matching seems to be case-sensitive so I thought to raise this issue.

Activity

  1. self-assigned this
    on Jun 27, 2026
  2. StefH commented on Jun 27, 2026

    @StefH
    Collaborator

    @glopesdev
    I see your issue, but this project follows some different rules:

    • Keywords, symbols and functions compare case depends on the value from ParsingConfig.IsCaseSensitive
    • Pre-defined Types are not IgnoreCase (like int16)
    • Custom DefinedTypes are not IgnoreCase
  3. StefH commented on Jun 27, 2026

    @StefH
    Collaborator
  4. glopesdev commented on Jun 27, 2026

    @glopesdev
    ContributorAuthor

    @StefH understood. Although, in that case, wouldn't it be better to simply make the whole library case-insensitive?

    I feel it might be easier to have a consistent set of expectations, rather than having types behaving differently from methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions