| Summary: | Opening hugetest.js from the smoketests project leads to "Cannot read property 'type' of null" error. | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Olivier Thomann <Olivier_Thomann> |
| Component: | JS Tools | Assignee: | Olivier Thomann <Olivier_Thomann> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P1 | CC: | Michael_Rennie |
| Version: | 11.0 | Flags: | Michael_Rennie:
review+
|
| Target Milestone: | 12.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
I think in this case the fix is to simply check if token is null. The parser doesn't tokenize when the syntax error for using octal decimal in strict mode is found. With that check, I do get the proper syntax error being reported at the right location. Delivered to master for review. Fix is trivial. A regression test has been added. Closing fixed |
Opening that file, I am getting: TypeError: Cannot read property 'type' of null at extractParseErrors (http://oliviert.orion.eclipse.org:9000/javascript/ternPlugins/eslint.js:60:18) at Object.run (http://oliviert.orion.eclipse.org:9000/javascript/ternPlugins/eslint.js:300:22) at run (http://oliviert.orion.eclipse.org:9000/tern/lib/tern.js:275:59) at http://oliviert.orion.eclipse.org:9000/tern/lib/tern.js:278:16 at Object.exports.withContext (http://oliviert.orion.eclipse.org:9000/tern/lib/infer.js:881:18) at http://oliviert.orion.eclipse.org:9000/tern/lib/tern.js:274:13 at analyzeAll (http://oliviert.orion.eclipse.org:9000/tern/lib/tern.js:406:15) at doRequest (http://oliviert.orion.eclipse.org:9000/tern/lib/tern.js:267:5) at Object.request (http://oliviert.orion.eclipse.org:9000/tern/lib/tern.js:168:7) at lint (http://oliviert.orion.eclipse.org:9000/javascript/plugins/ternWorkerCore.js:431:15) This is a must fix for 12.0.