Eval-Expression.NET icon indicating copy to clipboard operation
Eval-Expression.NET copied to clipboard

Ambiguous match found for: 'TryParse' for int, bool, DateTime

Open se opened this issue 4 years ago • 6 comments

Following code samples giving almost same error. Is there any way to fix this?

Code - 1:

Z.Expressions.Eval.Execute(@"bool.TryParse(""false"", out bool value);");

Error - 1:

Unhandled exception. Z.Expressions.Compiler.Shared.EvalException: Oops! Ambiguous match found for: 'TryParse'. The error occurred for expression "." at position 4 near ".TryParse(\"false\", out bo".

Code - 2:

Z.Expressions.Eval.Execute(@"DateTime.TryParse(""2020-01-01"", out DateTime date);");

Error - 2:

Unhandled exception. Z.Expressions.Compiler.Shared.EvalException: Oops! Ambiguous match found for: 'TryParse'. The error occurred for expression "." at position 8 near ".TryParse(\"2020-01-01\", o".

Code - 3:

Z.Expressions.Eval.Execute(@"DateTime.TryParse(""2020-01-01"", out var date);");

Error - 3:

Unhandled exception. Z.Expressions.Compiler.Shared.EvalException: Oops! Ambiguous match found for: 'TryParse'. The error occurred for expression "." at position 8 near ".TryParse(\"2020-01-01\", o".

se avatar Jan 06 '21 17:01 se

Hello @se ,

Thank you for reporting,

It seems to look under .NET Framework but we have an issue on .NET Core.

We will look at what is missing.

Best Regards,

Jon

JonathanMagnan avatar Jan 06 '21 20:01 JonathanMagnan

Any luck on this?

se avatar Jan 11 '21 14:01 se

Hello @se ,

Yes, my developer fixed it and we will complete the review tomorrow.

So if everything is fine, we will make a new release on Tuesday or Wednesday

JonathanMagnan avatar Jan 11 '21 15:01 JonathanMagnan

Hello @se ,

The v4.0.29 has been released.

Could you try it and let us know if that has been fixed correctly?

Best Regards,

Jon

JonathanMagnan avatar Jan 14 '21 02:01 JonathanMagnan

It seems fixed. Thank you so much!

se avatar Jan 20 '21 08:01 se

Awesome @se !

we are glad to hear that it has been fixed!

Don't hesitate to contact us with any questions, or further assistance,

Jon

JonathanMagnan avatar Jan 20 '21 13:01 JonathanMagnan