Loading ...
Sorry, an error occurred while loading the content.

Re: Bug: unintialized variable with name 'constructor' gives strange error

Expand Messages
  • Douglas Crockford
    ... Thanks for the report. Please try it again.
    Message 1 of 4 , Mar 4, 2009
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "bertbelder" <bertbelder@...> wrote:
      >
      > It seems that using a variable named "constructor" that is not declared (which in itself is wrong off course) always produces a strange error. The rhino version of JSLint even crashes when you make this mistake.

      > Trying to lint this:
      > constructor = 1;
      >
      > JSLint produces the error:
      > Problem at line 1 character 15: a.push is not a function

      Thanks for the report. Please try it again.
    • bertbelder
      Wow! I ve never had a response to a bug report that quickly, ever. It s fixed indeed. Thanks. -Bert
      Message 2 of 4 , Mar 4, 2009
      • 0 Attachment
        Wow! I've never had a response to a bug report that quickly, ever.
        It's fixed indeed.

        Thanks. -Bert
      • santini.alberto
        ... Linted on itself: Error: Problem at line 180 character 1: Expected an assignment or function call and instead saw an expression. use strict ; Problem at
        Message 3 of 4 , Mar 5, 2009
        • 0 Attachment
          --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...>
          > Thanks for the report. Please try it again.

          Linted on itself:

          Error:

          Problem at line 180 character 1: Expected an assignment or function call and instead saw an expression.

          "use strict";

          Problem at line 3567 character 17: Expected 'if' to have an indentation of 12 instead of 16.

          if (typeof s === 'function') {

          Problem at line 3568 character 21: Expected 's' to have an indentation of 16 instead of 20.

          s = false;

          Problem at line 3569 character 17: Expected '}' to have an indentation of 12 instead of 16.

          }


          Regards,
          Alberto
        Your message has been successfully submitted and would be delivered to recipients shortly.