84 Commits

Author SHA1 Message Date
Geoffrey Booth
07f644c392 Fix call MetaProperty (#5324) 2020-06-02 21:00:40 -07:00
Julian Rosse
09caa217c2 AST: test compile errors (#5260)
* multiple splats error

* delete operand; catch variable

* disallow multiple splats

* unassignable conditional

* lone expansion param

* class bodies pure statements/arguments

* remove duplicate

* getAndCheckSplatProps()

* getAndCheckSplatsAndExpansions()

* clean up disallowLoneExpansionAndMultipleSplats()
2019-12-16 00:16:55 -05:00
Geoffrey Booth
5596a5c209 Merge branch 'master' of github.com:jashkenas/coffeescript into ast
# Conflicts:
#	lib/coffeescript/grammar.js
#	lib/coffeescript/parser.js
2019-04-28 16:27:26 -07:00
Julian Rosse
71750554c3 Allow computed class properties (#5206)
* fix broken JS output

* static computed properties
2019-04-28 15:45:57 -07:00
Geoffrey Booth
0b5bac666f Merge branch 'master' into ast
# Conflicts:
#	lib/coffeescript/grammar.js
#	lib/coffeescript/nodes.js
#	lib/coffeescript/parser.js
#	package-lock.json
#	src/nodes.coffee
#	test/error_messages.coffee
2019-03-24 19:22:33 -07:00
Julian Rosse
3f5abb3c60 MetaProperty AST (new.target) (#5170)
* updated grammar

* updated grammar

* passing tests

* test errors ast
2019-03-16 18:51:39 -07:00
Alex
63ffe0aead Fix 5085 (#5145)
* Add test for #5085

    $ cake test
    failed 1 and passed 1274 tests in 4.81 seconds

      #5085: Bug: @ reference to class not maintained in do block
      AssertionError [ERR_ASSERTION]: Expected undefined to equal 2

* Fix #5085: @ reference to class in "do" block

Assuming that a bound Code node inside an ExecutableClassBody without a
name must be a "do" block.

* Additional tests

https://github.com/jashkenas/coffeescript/pull/5145#issuecomment-462127244

Also switched to concat'g strings for test values, as opposed to
incrementing numbers: makes the tests a bit easier to read.
2019-02-11 07:28:04 -08:00
Julian Rosse
e934a42e75 Op AST (#5109)
* op ast

* test expected errors

* use new ast methods

* remove unused abstraction

* logical ?

* fix rebase

* follow convention

* fixes from code review

* test helper naming

* always convert new to Call

* new cases

* don't mutate locationData
2018-10-08 10:20:27 -07:00
Julian Rosse
6225627579 Fix #4609: support new.target (#5106)
* support new.target

* check token type
2018-09-16 13:52:47 -07:00
Robert de Forest
ce66a499de Make node --harmony bin/cake test pass on Node 9 (#5012)
* Make `node --harmony bin/cake test` pass on Node 9

Make classMaker() explicitly return an object

* Update Travis and AppVeyor to use --harmony and v9
2018-03-17 23:02:40 -07:00
zdenko
bf91781888 Fix #4868: Incorrect ‘Can’t call super with @params’ error (#4869)
* fix #4868

* improvements

* tests
2018-01-30 21:06:54 -08:00
Chris Connelly
38f5963b85 Use free variables for anonymous classes (#4826)
Fixes #4822.
2017-12-28 14:50:12 -08:00
Chris Connelly
ffbe51e374 Set the context of executable class body wrappers (#4828)
Fixes #4827.
2017-12-18 10:51:08 -08:00
Chris Connelly
4d4e47bfb2 Fix #4724 (#4737)
The handling of hoisted nodes in class bodies was incorrect, as the node
was being unwrapped *before* checking if it was hoisted, meaning nodes
that should have been hoisted would be output normally.

This affected `PassthroughLiteral`s as they were wrapped in a `Value`.
2017-10-07 11:32:43 -07:00
Chris Connelly
27eff5ca77 Fix #4464: backticked expressions in class body (#4712)
* Fix #4464: backticked expressions in class body should be left in the body, not hoisted

* Fix #4464: backticked expressions in class body should be left in the body, not hoisted

* Simplify fix for #4464

This uses more of the existing machinery for moving class body
expressions into the initializer.

* Clarify the purpose of Class::addInitializerExpression

* Further clarify the purpose of Class::addInitializerExpression

* Add reference to class fields; format
 comment wrapping

* Reapply 1d3af8c432, that got lost because of rebase/force-push shenanigans

* Updated output
2017-09-20 19:11:05 -07:00
Julian Rosse
852c5786ee [CS2]: Fix #4591: multiple accesses after super (#4592)
* support multiple accesses after super [Fixes #4591]

* addtl tests from code review
2017-07-13 13:15:18 -07:00
Julian Rosse
9a48566b24 [CS2] Restore bound class methods via runtime check to avoid premature calling of bound method before binding (#4561)
* bound method runtime check

* restore bound method tests

* bound method tests

* test bound method in prop-named class

* run check against parent class

* dummy commit

* remove comment

* rename to boundMethodCheck

* fixes from code review

* use ref to own class for check

* fixes from code review

* remove unneeded param
2017-06-14 15:11:53 -07:00
Chris Connelly
76e70a6c81 Fix immediately invoked named classes (#4569)
Fixes #4436.
2017-06-12 23:11:39 -07:00
Chris Connelly
3e70d31e5d Remove support for bound instance methods (#4530)
Bound methods are implemented as assignments to `this` in the
constructor. In derived classes, where `this` is unavailable until
after `super` has been called, the binding is applied and assigned after
the `super` call. This means that any references to 'bound' methods
reachable from the parent constructor will actually point to the unbound
prototype methods.

This can lead to very subtle bugs where a method that is thought to be
bound is handed off and later called with an incorrect context, and the
only defence is for users to be vigilant about referencing bound methods
in constructors.
2017-04-27 23:03:01 -07:00
Chris Connelly
396bd4f2f2 [CS2] Compile all super calls to ES2015 super (#4424)
* Compile all super calls to ES2015 super

This breaks using `super` in non-methods, meaning several tests are
failing. Self-compilation still works.

* Use bound functions for IIFEs containing `super`

`super` can only be called directly in a method, or in an arrow
function.

* Fix handling of `class @A extends A`

This behaviour worked 'for free' when the parent reference was being
cached by the executable class body wrapper. There now needs to be
special handling in place to check if the parent name matches the class
name, and if so to cache the parent reference.

* Fix tests broken by compiling ES2015 `super`

* Disallow bare super

This removes syntax support for 'bare' super calls, e.g.:

    class B extends A
      constructor: -> super

`super` must now always be followed with arguments like a regular
function call. This also removes the capability of implicitly forwarding
arguments. The above can be equivalently be written as:

    class B extends A
      constructor: -> super arguments...

* Support super with accessors

`super` with following accessor(s) is now compiled to ES2015
equivalents. In particular, expressions such as `super.name`,
`super[name]`, and also `super.name.prop` are all now valid, and can be
used as expected as calls (i.e. `super.name()`) or in expressions (i.e.
`if super.name? ...`).

`super` without accessors is compiled to a constructor super call in a
constructor, and otherwise, as before, to a super call to the method of
the same name, i.e.

    speak: -> super()

...is equivalent to

    speak: -> super.speak()

A neat side-effect of the changes is that existential calls now work
properly with super, meaning `super?()` will only call if the super
property exists (and is a function). This is not valid for super in
constructors.

* Prevent calling `super` methods with `new`

This fixes a bug in the previous super handling whereby using the `new`
operator with a `super` call would silently drop the `new`. This is now
an explicit compiler error, as it is invalid JS at runtime.

* Clean up some old super handling code

This was mostly code for tracking the source classes and variables for
methods, which were needed to build the old lookups on `__super__`.

* Add TODO to improve bare super parse error

* Add some TODOs to improve some of the class tests
2017-02-04 12:03:17 -08:00
Chris Connelly
4f6073f283 Fix scope of assignments in dynamic class keys
Dynamic class keys were using the method scope for compilation,
resulting in missing declarations and runtime errors.
2017-01-19 21:47:25 +00:00
Chris Connelly
8d81804fee [CS2] Compile class constructors to ES2015 classes (#4354)
* Compile classes to ES2015 classes

Rather than compiling classes to named functions with prototype and
class assignments, they are now compiled to ES2015 class declarations.

Backwards compatibility has been maintained by compiling ES2015-
incompatible properties as prototype or class assignments. `super`
continues to be compiled as before.

Where possible, classes will be compiled "bare", without an enclosing
IIFE. This is possible when the class contains only ES2015 compatible
expressions (methods and static methods), and has no parent (this last
constraint is a result of the legacy `super` compilation, and could be
removed once ES2015 `super` is being used). Classes are still assigned
to variables to maintain compatibility for assigned class expressions.

There are a few changes to existing functionality that could break
backwards compatibility:

- Derived constructors that deliberately don't call `super` are no
  longer possible. ES2015 derived classes can't use `this` unless the
  parent constructor has been called, so it's now called implicitly when
  not present.

- As a consequence of the above, derived constructors with @ parameters
  or bound methods and explicit `super` calls are not allowed. The
  implicit `super` must be used in these cases.

* Add tests to verify class interoperability with ES

* Refactor class nodes to separate executable body logic

Logic has been redistributed amongst the class nodes so that:

- `Class` contains the logic necessary to compile an ES class
  declaration.
- `ExecutableClassBody` contains the logic necessary to compile CS'
  class extensions that require an executable class body.

`Class` still necessarily contains logic to determine whether an
expression is valid in an ES class initializer or not. If any invalid
expressions are found then `Class` will wrap itself in an
`ExecutableClassBody` when compiling.

* Rename `Code#static` to `Code#isStatic`

This naming is more consistent with other `Code` flags.

* Output anonymous classes when possible

Anonymous classes can be output when:

- The class has no parent. The current super compilation needs a class
  variable to reference. This condition will go away when ES2015 super
  is in use.
- The class contains no bound static methods. Bound static methods have
  their context set to the class name.

* Throw errors at compile time for async or generator constructors

* Improve handling of anonymous classes

Anonymous classes are now always anonymous. If a name is required (e.g.
for bound static methods or derived classes) then the class is compiled
in an `ExecutableClassBody` which will give the anonymous class a stable
reference.

* Add a `replaceInContext` method to `Node`

`replaceInContext` will traverse children looking for a node for which
`match` returns true. Once found, the matching node will be replaced by
the result of calling `replacement`.

* Separate `this` assignments from function parameters

This change has been made to simplify two future changes:

1. Outputting `@`-param assignments after a `super` call.
   In this case it is necessary that non-`@` parameters are available
   before `super` is called, so destructuring has to happen before
   `this` assignment.
2. Compiling destructured assignment to ES6
   In this case also destructuring has to happen before `this`,
   as destructuring can happen in the arguments list, but `this`
   assignment can not.

A bonus side-effect is that default values for `@` params are now output
as ES6 default parameters, e.g.

    (@a = 1) ->

becomes

    function a (a = 1) {
      this.a = a;
    }

* Change `super` handling in class constructors

Inside an ES derived constructor (a constructor for a class that extends
another class), it is impossible to access `this` until `super` has been
called. This conflicts with CoffeeScript's `@`-param and bound method
features, which compile to `this` references at the top of a function
body. For example:

    class B extends A
      constructor: (@param) -> super
      method: =>

This would compile to something like:

    class B extends A {
      constructor (param) {
        this.param = param;
        this.method = bind(this.method, this);
        super(...arguments);
      }
    }

This would break in an ES-compliant runtime as there are `this`
references before the call to `super`. Before this commit we were
dealing with this by injecting an implicit `super` call into derived
constructors that do not already have an explicit `super` call.
Furthermore, we would disallow explicit `super` calls in derived
constructors that used bound methods or `@`-params, meaning the above
example would need to be rewritten as:

    class B extends A
      constructor: (@param) ->
      method: =>

This would result in a call to `super(...arguments)` being generated as
the first expression in `B#constructor`.

Whilst this approach seems to work pretty well, and is arguably more
convenient than having to manually call `super` when you don't
particularly care about the arguments, it does introduce some 'magic'
and separation from ES, and would likely be a pain point in a project
that made use of significant constructor overriding.

This commit introduces a mechanism through which `super` in constructors
is 'expanded' to include any generated `this` assignments, whilst
retaining the same semantics of a super call. The first example above
now compiles to something like:

    class B extends A {
      constructor (param) {
        var ref
        ref = super(...arguments), this.param = param, this.method = bind(this.method, this), ref;
      }
   }

* Improve `super` handling in constructors

Rather than functions expanding their `super` calls, the `SuperCall`
node can now be given a list of `thisAssignments` to apply when it is
compiled.

This allows us to use the normal compiler machinery to determine whether
the `super` result needs to be cached, whether it appears inline or not,
etc.

* Fix anonymous classes at the top level

Anonymous classes in ES are only valid within expressions. If an
anonymous class is at the top level it will now be wrapped in
parenthses to force it into an expression.

* Re-add Parens wrapper around executable class bodies

This was lost in the refactoring, but it necessary to ensure
`new class ...` works as expected when there's an executable body.

* Throw compiler errors for badly configured derived constructors

Rather than letting them become runtime errors, the following checks are
now performed when compiling a derived constructor:

- The constructor **must** include a call to `super`.
- The constructor **must not** reference `this` in the function body
  before `super` has been called.

* Add some tests exercising new class behaviour

- async methods in classes
- `this` access after `super` in extended classes
- constructor super in arrow functions
- constructor functions can't be async
- constructor functions can't be generators
- derived constructors must call super
- derived constructors can't reference `this` before calling super
- generator methods in classes
- 'new' target

* Improve constructor `super` errors

Add a check for `super` in non-extended class constructors, and
explicitly mention derived constructors in the "can't reference this
before super" error.

* Fix compilation of multiple `super` paths in derived constructors

`super` can only be called once, but it can be called conditionally from
multiple locations. The chosen fix is to add the `this` assignments to
every super call.

* Additional class tests, added as a separate file to simplify testing and merging.
Some methods are commented out because they currently throw and I'm not sure how
to test for compilation errors like those.

There is also one test which I deliberately left without passing, `super` in an external prototype override.
This test should 'pass' but is really a variation on the failing `super only allowed in an instance method`
tests above it.

* Changes to the tests. Found bug in super in prototype method. fixed.

* Added failing test back in, dealing with bound functions in external prototype overrides.

* Located a bug in the compiler relating to assertions and escaped ES6 classes.

* Move tests from classes-additional.coffee into classes.coffee; comment out console.log

* Cleaned up tests and made changes based on feedback.  Test at the end still has issues, but it's commented out for now.

* Make HoistTarget.expand recursive

It's possible that a hoisted node may itself contain hoisted nodes (e.g.
a class method inside a class method). For this to work the hoisted
fragments need to be expanded recursively.

* Uncomment final test in classes.coffee

The test case now compiles, however another issue is affecting the test
due to the error for `this` before `super` triggering based on source
order rather than execution order. These have been commented out for
now.

* Fixed last test TODOs in test/classes.coffee

Turns out an expression like `this.foo = super()` won't run in JS as it
attempts to lookup `this` before evaluating `super` (i.e. throws "this
is not defined").

* Added more tests for compatability checks, statics, prototypes and ES6 expectations.  Cleaned test "nested classes with super".

* Changes to reflect feedback and to comment out issues that will be addressed seperately.

* Clean up test/classes.coffee

- Trim trailing whitespace.
- Rephrase a condition to be more idiomatic.

* Remove check for `super` in derived constructors

In order to be usable at runtime, an extended ES class must call `super`
OR return an alternative object. This check prevented the latter case,
and checking for an alternative return can't be completed statically
without control flow analysis.

* Disallow 'super' in constructor parameter defaults

There are many edge cases when combining 'super' in parameter defaults
with @-parameters and bound functions (and potentially property
initializers in the future).

Rather than attempting to resolve these edge cases, 'super' is now
explicitly disallowed in constructor parameter defaults.

* Disallow @-params in derived constructors without 'super'

@-parameters can't be assigned unless 'super' is called.
2017-01-12 21:55:30 -08:00
Geoffrey Booth
fb2be8e1e3 [CS2] Output ES2015 arrow functions, default parameters, rest parameters (#4311)
* Eliminate wrapper around “bound” (arrow) functions; output `=>` for such functions

* Remove irrelevant (and breaking) tests

* Minor cleanup

* When a function parameter is a splat (i.e., it uses the ES2015 rest parameter syntax) output that parameter as ES2015

* Rearrange function parameters when one of the parameters is a splat and isn’t the last parameter (very WIP)

* Handle params like `@param`, adding assignment expressions for them when they appear; ensure splat parameter is last

* Add parameter names (not a text like `'\nValue IdentifierLiteral: a'`) to the scope, so that parameters can’t be deleted; move body-related lines together; more explanation of what’s going on

* For parameters with a default value, correctly add the parameter name to the function scope

* Handle expansions in function parameters: when an expansion is found, set the parameters to only be the original parameters left of the expansion, then an `...args` parameter; and in the function body define variables for the parameters to the right of the expansion, including setting default values

* Handle splat parameters the same way we handle expansions: if a splat parameter is found, it becomes the last parameter in the function definition, and all following parameters get declared in the function body. Fix the splat/rest parameter values after the post-splat parameters have been extracted from it. Clean up `Code.compileNode` so that we loop through the parameters only once, and we create all expressions using calls like `new IdentifierLiteral` rather than `@makeCode`.

* Fix parameter name when a parameter is a splat attached to `this` (e.g. `@param...`)

* Rather than assigning post-splat parameters based on index, use slice; passes test “Functions with splats being called with too few arguments”

* Dial back our w00t indentation

* Better parsing of parameter names (WIP)

* Refactor processing of splat/expansion parameters

* Fix assignment of default parameters for parameters that come after a splat

* Better check for whether a param is attached to `this`

* More understandable variable names

* For parameters after a splat or expansion, assign them similar to the 1.x destructuring method of using `arguments`, except only concern ourselves with the post-splat parameters instead of all parameters; and use the splat/expansion parameter name, since `arguments` in ES fat arrow functions refers to the parent function’s `arguments` rather than the fat arrow function’s arguments/parameters

* Don’t add unnamed parameters (like `[]` as a parameter) to the function scope

* Disallow multiple splat/expansion parameters in function definitions; disallow lone expansion parameters

* Fix `this` params not getting assigned if the parameter is after a splat parameter

* Allow names of function parameters attached to `this` to be reserved words

* Always add a statement to the function body defining a variable with its default value, if it has one, if the variable `== null`; this covers the case when ES doesn’t apply the default value when `null` is passed in as a value, but CoffeeScript expects `null` and `undefined` to act interchangeably

* Aftermath of having both `undefined` and `null` trigger the use of default values for parameters with default values

* More careful parsing of destructured parameters

* Fall back to processing destructured parameters in the function body, to account for `this` or default values within destructured objects

* Clean up comments

* Restore new bare function test, minus the arrow function part of it

* Test that bound/arrow functions aren’t overwriting the `arguments` object, which should refer to the parent scope’s `arguments` (like `this`)

* Follow ES2015 spec for parameter default values: `null` gets assigned as as `null`, not the default value

* Mimic ES default parameters behavior for parameters after a splat or expansion parameter

* Bound functions cannot be generators: remove no-longer-relevant test, add check to throw error if `yield` appears inside a bound (arrow) function

* Error for bound generator functions should underline the `yield`
2016-10-25 22:26:13 -07:00
Simon Lydell
32041806ae Fix isLiteralArguments
`isLiteralArguments` mistakenly looked at `Literal`s instead of
`IdentifierLiteral`s.

This also gets rid of the ugly `.asKey` hack in nodes.coffee.

Fixes #4320.
2016-09-26 15:33:44 +02:00
Simon Lydell
76c076db55 Fix #3597: Allow interpolations in object keys
The following is now allowed:

    o =
      a: 1
      b: 2
      "#{'c'}": 3
      "#{'d'}": 4
      e: 5
      "#{'f'}": 6
      g: 7

It compiles to:

    o = (
      obj = {
        a: 1,
        b: 2
      },
      obj["" + 'c'] = 3,
      obj["" + 'd'] = 4,
      obj.e = 5,
      obj["" + 'f'] = 6,
      obj.g = 7,
      obj
    );

- Closes #3039. Empty interpolations in object keys are now _supposed_ to be
  allowed.
- Closes #1131. No need to improve error messages for attempted key
  interpolation anymore.
- Implementing this required fixing the following bug: `("" + a): 1` used to
  error out on the colon, saying "unexpected colon". But really, it is the
  attempted object key that is unexpected. Now the error is on the opening
  parenthesis instead.
- However, the above fix broke some error message tests for regexes. The easiest
  way to fix this was to make a seemingly unrelated change: The error messages
  for unexpected identifiers, numbers, strings and regexes now say for example
  'unexpected string' instead of 'unexpected """some #{really long} string"""'.
  In other words, the tag _name_ is used instead of the tag _value_.
  This was way easier to implement, and is more helpful to the user. Using the
  tag value is good for operators, reserved words and the like, but not for
  tokens which can contain any text. For example, 'unexpected identifier' is
  better than 'unexpected expected' (if a variable called 'expected' was used
  erraneously).
- While writing tests for the above point I found a few minor bugs with string
  locations which have been fixed.
2015-02-09 17:32:37 +01:00
Simon Lydell
ee8f889cbd Allow super in methods with dynamic names
As discussed in https://github.com/jashkenas/coffeescript/issues/3039#issuecomment-68916918.
This is the first step to implement dynamic object literal keys (see #3597).

This also fixes #1392.

In short, `super` is now allowed:

    # in class definitions:
    class A
      instanceMethod: -> super
      @staticMethod: -> super
      @staticMethod2 = -> super

    # in assignment where the next to last access is 'prototype':
    A::m = -> super
    A.prototype.m = -> super
    a.b()[5]::m = -> super
    A::[x()] = -> super
    class B
      @::m = -> super
2015-02-03 20:46:37 +01:00
Marc Häfner
aea0f2533b Fixes #3232 -- Tag all class properties static
(and remove duplicate `context` assigment)
2013-11-15 03:44:26 +01:00
Marc Häfner
138c25fe5f Cleanup and extend METHOD_DEF
* Fixes #2949: Detect reserved names (not only for instance methods)
  * Don't assign names which might result in incorrect `super` calls
2013-11-12 16:53:09 +01:00
Marc Häfner
1df8abf1cb Refactor closure compilation
* Break up `Closure` and merge `Closure.wrap` into `Base.compileClosure`
* Construct class closure directly in `Class.compileNode`
* Reuse `isLiteralArguments` in `Range.compileArray`
* Move all helpers to bottom of file
* Add test for #3063
2013-10-31 23:25:11 +01:00
Marc Häfner
9ba1d41ec8 Fix: __extends helper above directive prologue 2013-10-26 06:54:54 +02:00
Jeremy Ashkenas
0cadcdc097 Fix regression with executable class bodies and prototypal attachment. 2013-04-06 09:31:24 +08:00
Jeremy Ashkenas
8f7f3627e0 Fixes #2796, by adding a test for it. 2013-03-07 23:13:22 +13:00
Jeremy Ashkenas
8b134cf348 Add an additonal test, courtesy @matehat 2013-03-07 23:10:39 +13:00
Jeremy Ashkenas
67de35ff29 Fixes #2781, fixes #2782. Reverting to old method of instance method binding. 2013-03-07 23:09:32 +13:00
Jeremy Ashkenas
903e9c994c Fixes #2773 -- tricky dependency ordering when overriding bound functions. 2013-03-05 15:35:02 +13:00
Jeremy Ashkenas
cf11a570e9 Fixes #2489, fixes #1819, fixes #1821 -- remove the __bind helper. 2013-03-04 23:11:38 +13:00
Jeremy Ashkenas
9fe0e711d6 Fixes #2502 -- improper compilation with parenthesized inner value of instance properties in a class body. 2013-03-04 22:26:55 +13:00
Jeremy Ashkenas
6b79af2b7c Fixes #2721, super outside of classes with extends for instance methods. 2013-03-01 13:17:07 +13:00
Demian Ferreiro
4469d062e1 Add a couple of tests to document the behaviour of other typed constructors 2013-02-28 10:37:47 -03:00
Demian Ferreiro
bf70b4660e Revert #2599 2013-02-28 10:37:30 -03:00
Troels Nielsen
1666716c31 Improve the handling of implicit object and implicit call combinations
by handling them together.
2013-02-27 08:15:38 +01:00
Demian Ferreiro
dcdfe9bc34 Fix indentation on test 2013-02-25 14:15:24 -03:00
Jeremy Ashkenas
78891a0ccc Merging in @epedemian's fix for #2359 -- disallow other-typed constructors 2013-02-01 22:30:22 +11:00
Jeremy Ashkenas
82aeb70380 Fixes #2630 -- Class bodies shouldn't be able to reference arguments. 2013-01-06 19:08:32 -10:00
Demian Ferreiro
52b0f76eb2 Prevent constructors from returning values 2012-10-28 08:55:48 -03:00
Demian Ferreiro
e46b129c4f Remove return statement on auto-generated constructors 2012-10-28 08:55:02 -03:00
Michael Ficarra
4043124135 tests for fix to #2052, f3a1f46679 2012-04-11 18:35:51 -04:00
Michael Ficarra
e207c983c1 cleaned up trailing whitespace; merging @geraldalewis's #2033 2012-01-16 15:50:09 -05:00
Gerald Lewis
ee9311c025 #1534 class then "use strict": modified strict error condition 2012-01-16 14:09:06 -05:00
Gerald Lewis
2ec4c38433 #1534 class then "use strict": multiple directives support 2012-01-14 15:07:32 -05:00