// IGNORE_BACKEND_K1: WASM // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS // on JS Parser.parse and MultiParser.parse clash in ProjectInfoJsonParser class JsonObject { } class JsonArray { } class ProjectInfo { override fun toString(): String = "OK" } public interface Parser { public fun parse(source: IN): OUT } public interface MultiParser { public fun parse(source: IN): Collection } public interface JsonParser: Parser, MultiParser { public override fun parse(source: JsonArray): Collection { return ArrayList() } } public abstract class ProjectInfoJsonParser(): JsonParser { public override fun parse(source: JsonObject): ProjectInfo { return ProjectInfo() } } class ProjectApiContext { public val projectInfoJsonParser: ProjectInfoJsonParser = object : ProjectInfoJsonParser(){ } } fun box(): String { val context = ProjectApiContext() val array = context.projectInfoJsonParser.parse(JsonArray()) return if (array != null) "OK" else "fail" }