ericmckean / traceur-compiler

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

Removal of NullTree broke arrays with holes in them. #191

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to compile any code using arrays that have holes, for example [,0] 
http://traceur-compiler.googlecode.com/git/demo/repl.html#%5B%2C0%5D

What is the expected output? What do you see instead?
It should compile without problems. Instead, I get this error: TypeError: 
Cannot read property 'type' of null
in this function: 
https://code.google.com/p/traceur-compiler/source/browse/src/codegeneration/Spre
adTransformer.js#61

Please provide any additional information below.
This commit 
https://code.google.com/p/traceur-compiler/source/detail?r=314be9a6b42e49f1b466e
4d60e100960b9a4ebf4 is the culprit, NullTree was replaced with null, but not 
all required null checks have been added.

Original issue reported on code.google.com by edy.b...@gmail.com on 15 Jan 2013 at 4:55

GoogleCodeExporter commented 9 years ago
https://code.google.com/p/traceur-compiler/source/detail?r=c9f60c6

It is possible that there needs to be more null checks here. If that is the 
case we can reopen or create a new bug.

Original comment by arv@chromium.org on 23 Jan 2013 at 10:11