Skip to content

Block Comments Generate Anonymous Functions #1386

@STRd6

Description

@STRd6

This CoffeeScript

self = Core(I).extend
  ###*
  A Block Comment
  ###
  key: val

  ###
  Huh? These are functions?
  ###
  key2: ->
    test

Generates the following JavaScript:

var self;
self = Core(I).extend((function() {
  /**
  A Block Comment
  */
})(), {
  key: val
}, (function() {
  /*
  Huh? These are functions?
      */
})(), {
  key2: function() {
    return test;
  }
});

It should instead generate something more like this:

var self;
self = Core(I).extend({      /**
  Huh?
  */
  key: val,
  /*
  Huh? These are functions?
      */
  key2: function() {
    return test;
  }
});

So instead of passing a single object as the sole parameter to Core(I).extend it passes 4 arguments, undefined for each comment, and an object for each key.

This previously worked in 0.9.4, but is now broken in 1.1.1

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions