compress undefined property names (#2811)

- enforce property names as string
- handle `void 0` as `undefined` in `hoist_props` & `reduce_vars`
This commit is contained in:
Alex Lam S.L
2018-01-19 00:36:30 +08:00
committed by GitHub
parent 983e69128b
commit 082e004b87
6 changed files with 46 additions and 16 deletions

View File

@@ -84,12 +84,12 @@ numeric_literal: {
' 0: 0,',
' "-0": 1,',
' 42: 2,',
' "42": 3,',
' 42: 3,',
' 37: 4,',
' o: 5,',
' 1e42: 6,',
' b: 7,',
' "1e+42": 8',
' 1e42: 8',
'};',
'',
'console.log(obj[-0], obj[-""], obj["-0"]);',