Skip to content

Commit 57cdbbe

Browse files
committed
- fix issue in .net 3.5
1 parent 94c8494 commit 57cdbbe

File tree

1 file changed

+4
-2
lines changed
  • Templates/Frameworks/PLINQO/Source/CodeSmith.Data/Linq

1 file changed

+4
-2
lines changed

Templates/Frameworks/PLINQO/Source/CodeSmith.Data/Linq/Evaluator.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ private Expression EvaluateArray(Expression e, object value)
145145
return Expression.Constant(value, e.Type);
146146

147147
var initializers = list.Cast<object>()
148-
.Select(o => Expression.Constant(o, itemType));
148+
.Select(o => Expression.Constant(o, itemType))
149+
.Cast<Expression>();
149150

150151
return Expression.NewArrayInit(itemType, initializers);
151152
}
@@ -165,7 +166,8 @@ private Expression EvaluateEnumerable(Expression e, object value, Type enumerabl
165166

166167
var newExpression = Expression.New(e.Type);
167168
var initializers = list.Cast<object>()
168-
.Select(o => Expression.Constant(o, itemType));
169+
.Select(o => Expression.Constant(o, itemType))
170+
.Cast<Expression>();
169171

170172
return Expression.ListInit(newExpression, initializers);
171173
}

0 commit comments

Comments
 (0)