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

Any reason to handle null this in ExpressionExtensions.Transform ? #46

Closed
NN--- opened this issue Oct 23, 2018 · 2 comments
Closed

Any reason to handle null this in ExpressionExtensions.Transform ? #46

NN--- opened this issue Oct 23, 2018 · 2 comments
Assignees

Comments

@NN---
Copy link
Member

NN--- commented Oct 23, 2018

Why no throw exception?

[Pure]
		public static Expression Transform([CanBeNull] this Expression expr, [NotNull] Func<Expression, Expression> func)
		{
			if (func == null) throw new ArgumentNullException(nameof(func));

			return TransformInternal(expr, func);
		}

		[CanBeNull]
		private static Expression TransformInternal([CanBeNull] this Expression expr, [NotNull] Func<Expression, Expression> func)
		{
			if (expr == null)
				return null;
...
}
@ig-sinicyn
Copy link
Contributor

@igor-tkachev Can you check this?

@NN---
Copy link
Member Author

NN--- commented Nov 14, 2018

@igor-tkachev Ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants