JS backend: ignore reference to this when generate sourcemap

This commit is contained in:
Zalim Bashorov
2013-10-07 20:09:56 +04:00
parent 5966255d4b
commit d3b4e4eb1f
2 changed files with 17 additions and 1 deletions
@@ -61,7 +61,7 @@ public class JsSourceGenerationVisitor extends JsToStringGenerationVisitor imple
@Override
public void accept(JsNode node) {
if (!(node instanceof JsNameRef)) {
if (!(node instanceof JsNameRef) && !(node instanceof JsLiteral.JsThisRef)) {
mapSource(node);
}
super.accept(node);
@@ -0,0 +1,16 @@
package foo
//KT-4054
class A() {
fun f0() {}
fun f1() {
f0()
this.f0()
}
}
fun box(): String {
return "OK"
}