Is there any known issue, or cases where it isn't ...
# javascript
e
Is there any known issue, or cases where it isn't supported, with
KClass.isInstance(someObject)
in K/JS? Example usage:
Copy code
getKindOfOpsInsertBeforeOp(rewrites, InsertBeforeOp::class, i)

...

private fun T : RewriteOperation getKindOfOps(
  rewrites: ListRewriteOperation?,
  kind: KClass*,
  before: Int,
): ListT {
  ...
  while (i < before && i < rewrites.size) {
    ...
    if (kind.isInstance(op)) {
      @Suppress("UNCHECKED_CAST")
      ops.add(op as T)
    }
  }
  return ops
}
a
No, it should work in runtime for both classes and interfaces.
e
Perfect, thanks!