Skip to content

'it' is not defined when referenced only by object literals? #899

@dk00

Description

@dk00
->
  it.name
->
  it
  {it.name}
->
  {it.name}

compiles to:

// Generated by LiveScript 1.5.0
(function(it){
  return it.name;
});
(function(it){
  it;
  return {
    name: it.name
  };
});
(function(){
  return {
    name: it.name
  };
});

the third function has no argument

Another example:

t = ->
  (cb) ->
    it
// Generated by LiveScript 1.5.0
var t;
t = function(){
  return function(cb){
    return it;
  };
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions