brettminnie / closure-linter

Automatically exported from code.google.com/p/closure-linter
Apache License 2.0
0 stars 0 forks source link

Using 'default' keyword as object identifier causes silent exit #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
Fixed in 2.3.11

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