JS: fix synthethic name bindings for the inlined local declarations

TODO add synthetic order-based namebindings for inlined local
declarations AFTER all post-processings. This would be a more robust
approach imho
This commit is contained in:
Anton Bannykh
2019-02-07 20:35:47 +03:00
parent 32de99fe32
commit 370194796e
@@ -136,8 +136,9 @@ fun collectDefinedNamesInAllScopes(scope: JsNode): Set<JsName> {
override fun visitFunction(x: JsFunction) {
super.visitFunction(x)
x.name?.let { names += it }
// TODO This is a hack
names += x.parameters.map { it.name }
x.name?.let { names += it }
}
override fun visitBreak(x: JsBreak) {