On 2/3/2014 10:22 AM, Claude Pache wrote:
Therefore, it would be nice if `return expression` would be statically forbidden in the `constructor` method when defined using the `class` syntax (but a bare `return` is fine, which slightly complicates the grammar).
I like the motivation, but doing it as an early error is problematic (having experienced a validator that differentiates between `return`, `return undefined`, and `return void expr` and complains loudly).
Instead I would suggest to throw an error at runtime if a class constructor returns anything besides undefined when it is constructed.
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

