Replace type entries of JsContext<*> with JsContext<JsNode>

It's needed to make method calls (e.g. replaceMe) on it typesafe,
otherwise it's value parameter type is subtype of captured
This commit is contained in:
Denis Zharkov
2015-12-22 08:03:37 +03:00
parent 9773e98d8a
commit ec0ec55ab5
6 changed files with 70 additions and 90 deletions
@@ -24,7 +24,7 @@ import org.jetbrains.kotlin.js.translate.utils.JsAstUtils.*
public fun expandIsCalls(node: JsNode, context: TranslationContext) {
val visitor = object : JsVisitorWithContextImpl() {
override fun visit(x: JsInvocation, ctx: JsContext<*>): Boolean {
override fun visit(x: JsInvocation, ctx: JsContext<JsNode>): Boolean {
val callee = x.getQualifier() as? JsInvocation
val instance = x.getArguments().firstOrNull()
val type = callee?.getArguments()?.firstOrNull()