Skip to content

Commit

Permalink
Fixed the normalizeVal for CLR.
Browse files Browse the repository at this point in the history
  • Loading branch information
otac0n committed Jul 9, 2011
1 parent 5859ba1 commit bc09b99
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Src/IronJS/Compiler.Utils.fs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
namespace IronJS.Compiler

open System
#if CLR2
open Microsoft.Scripting.Ast
#else
open System.Linq.Expressions
#endif

open IronJS
open IronJS.Runtime
Expand Down Expand Up @@ -77,7 +82,7 @@ module internal Utils =
let normalizeVal (expr:Dlr.Expr) =
if Dlr.Utils.isT<bool> expr
then match expr with
| :? System.Linq.Expressions.ConstantExpression as l -> !!!TaggedBools.ToTagged(l.Value :?> bool)
| :? ConstantExpression as l -> !!!TaggedBools.ToTagged(l.Value :?> bool)
| _ -> Dlr.ternary expr !!!TaggedBools.True !!!TaggedBools.False
else expr

Expand Down

0 comments on commit bc09b99

Please sign in to comment.