google/closure-linter

Using 'default' keyword as object identifier causes silent exit

GoogleCodeExporter opened this issue · 1 comments

What steps will reproduce the problem?

// file start
var a = {
    default: a
};

"fixjsstyle never gets here"
// file end


What is the expected output? What do you see instead?
Fixes errors up to default keyword, exits without error. It would be good to 
raise an error, or at least warning

Running with --error_trace=true gives following output

Traceback (most recent call last):
  File "build/bdist.macosx-10.8-intel/egg/closure_linter/runner.py", line 160, in RunMetaDataPass
    metadata_pass.Process(start_token)
  File "build/bdist.macosx-10.8-intel/egg/closure_linter/ecmametadatapass.py", line 465, in Process
    self._ProcessToken()
  File "build/bdist.macosx-10.8-intel/egg/closure_linter/ecmametadatapass.py", line 482, in _ProcessToken
    context = (self._ProcessContext() or self._context)
  File "build/bdist.macosx-10.8-intel/egg/closure_linter/ecmametadatapass.py", line 419, in _ProcessContext
    raise ParseError(token, 'Encountered case/default statement '
ParseError: Encountered case/default statement without switch statement


What version of the product are you using? On what operating system?
closure-linter==2.3.10, OSX 10.8.4

Please provide any additional information below.

Original issue reported on code.google.com by auberg...@gmail.com on 12 Aug 2013 at 9:24

Fixed in 2.3.11

Original comment by vagra...@google.com on 13 Aug 2013 at 4:48

  • Changed state: Fixed