Skip to content

Commit

Permalink
Fix casing
Browse files Browse the repository at this point in the history
  • Loading branch information
saraedum authored Apr 10, 2020
1 parent bd1e0af commit ed34ac6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ExpressionUtils/Evaluating/CachedExpressionCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ public VariadicArrayParametersDelegate CachedCompileLambda(LambdaExpression lamb
private LambdaExpression getClosureFreeKeyForCaching(ConstantExtractor.ExtractionResult extractionResult, IReadOnlyCollection<ParameterExpression> parameterExpressions) {
var e = SimpleParameterSubstituter.SubstituteParameter(extractionResult.ConstantfreeExpression,
extractionResult.ConstantfreeExpression.Parameters.Select(
p => (Expression) Expression.Constant(GetDefaultValue(p.Type), p.Type)));
p => (Expression) Expression.Constant(getDefaultValue(p.Type), p.Type)));

return Expression.Lambda(e, parameterExpressions);
}

private object GetDefaultValue(Type t) {
private static object getDefaultValue(Type t) {
if (t.IsValueType) {
return Activator.CreateInstance(t);
}
Expand Down

0 comments on commit ed34ac6

Please sign in to comment.