Skip to content

Commit

Permalink
Fix LambdaNode creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed Mar 3, 2013
1 parent 11ac8b7 commit 855be00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Lens.Parser/Node.fs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ let getterNode (symbol, accessorChain) =
upcast root

let lambda parameters code : NodeBase =
let node = FunctionNode(Body = code)
let node = LambdaNode(Body = code)
Option.iter
<| fun p -> node.Arguments <- p
<| parameters
Expand Down
8 changes: 4 additions & 4 deletions Lens.Test/ParserTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public void BareLambda()
var src = "let getFive = -> 5";
var result = new LetNode("getFive")
{
Value = new FunctionNode
Value = new LambdaNode
{
Body = { Expr.Int(5) }
}
Expand All @@ -298,7 +298,7 @@ public void ParametricLambda()
var src = "let div = (a:System.Float b:System.Float) -> a / b";
var result = new LetNode("div")
{
Value = new FunctionNode
Value = new LambdaNode
{
Arguments =
{
Expand Down Expand Up @@ -457,7 +457,7 @@ public void MultilineLambda()
logger.log a
a ** 2";

var result = new FunctionNode
var result = new LambdaNode
{
Arguments = { new FunctionArgument("a", "double") },
Body = Expr.Block(
Expand Down Expand Up @@ -490,7 +490,7 @@ logger.log a
var result = Expr.Invoke(
"test",
Expr.True(),
new FunctionNode
new LambdaNode
{
Arguments = { new FunctionArgument("a", "double") },
Body = Expr.Block(
Expand Down

0 comments on commit 855be00

Please sign in to comment.