From 1e74805aa4b652b87cdc617df09451b8536699ad Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Thu, 11 Feb 2010 23:59:56 -0500 Subject: [PATCH] test_operations.coffee is now compiling successfully --- lib/coffee_script/nodes.js | 2 +- src/nodes.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/coffee_script/nodes.js b/lib/coffee_script/nodes.js index 0d74df3d..b6d1907a 100644 --- a/lib/coffee_script/nodes.js +++ b/lib/coffee_script/nodes.js @@ -512,7 +512,7 @@ // in multiple places, ensure that the function is only ever called once. compile_reference: function compile_reference(o) { var call, reference; - reference = o.scope.free_variable(); + reference = new LiteralNode(o.scope.free_variable()); call = new ParentheticalNode(new AssignNode(reference, this)); return [call, reference]; } diff --git a/src/nodes.coffee b/src/nodes.coffee index 3b435e80..949ac2b9 100644 --- a/src/nodes.coffee +++ b/src/nodes.coffee @@ -366,7 +366,7 @@ CallNode: exports.CallNode: inherit Node, { # If the code generation wished to use the result of a function call # in multiple places, ensure that the function is only ever called once. compile_reference: (o) -> - reference: o.scope.free_variable() + reference: new LiteralNode(o.scope.free_variable()) call: new ParentheticalNode(new AssignNode(reference, this)) [call, reference]