Don't share instances of JsNameRef nodes to avoid wrong source maps

When to name references to the same name are represented by
a shared JS AST node, setting line number of the second usage may
override line number of the first usage.

Also, supply more JS AST nodes related to default parameters,
with corresponding source information.
This commit is contained in:
Alexey Andreev
2017-05-02 19:44:00 +03:00
parent e5662ac2ad
commit 4332f1cb2c
5 changed files with 43 additions and 3 deletions
+10
View File
@@ -0,0 +1,10 @@
fun box(
x: Int = 23,
y: Int =
42
) {
println(x)
println(y)
}
// LINES: 2 2 3 4 6 7