Skip to content

Commit

Permalink
Added support for Enum literals used as Operands
Browse files Browse the repository at this point in the history
  • Loading branch information
ssimek committed Oct 16, 2009
1 parent f0feb7d commit 3b93152
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions RunSharp/Operand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ public static Operand FromObject(object operandOrLiteral)

Type t = operandOrLiteral.GetType();

if (t.IsEnum)
return new EnumLiteral((Enum)operandOrLiteral);

if (t.IsPrimitive)
{
if (t == typeof(int))
Expand Down

0 comments on commit 3b93152

Please sign in to comment.