rra/ilgonmic/revert-signatures-changes

[JS IR] Fix line number test

[JS IR] Ignore isInstance repl test

[JS IR] Ignore isInstance repl test

[JS IR] Add test with unsafe variance

Revert "[JS IR] Optimize away upcasts"

This reverts commit 8149189585.

Get rid of duplicated signatures

Revert "[JS IR] Consider erasing type parameters in return type in js signatures"

This reverts commit 6adcbe081e.

Revert "rra/ilgonmic/exported-bridges-2 [JS IR] Use js name for signature"

This reverts commit 00289d35

[JS IR] Leave as is

[JS IR] Add test with overloading by generic

[JS IR] Add test from master

[JS IR] Add tests from master

Merge-request: KT-MR-5987
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-51700 fixed
^KT-51523 fixed
^KT-51685 fixed
This commit is contained in:
Ilya Goncharov
2022-04-05 15:35:12 +00:00
committed by Space
parent 1cb5cab28f
commit 002d62de89
14 changed files with 162 additions and 249 deletions
@@ -0,0 +1,21 @@
abstract class Foo<out E> {
abstract fun foo(element: @UnsafeVariance E): Boolean
}
class Bar<E : C> : Foo<E>() {
override fun foo(element: E): Boolean {
if (element !is C?) return false
return true
}
}
open class C
open class D : C()
fun box(): String {
val a = (object{})
val foo: Foo<Any?> = Bar<D>()
if (foo.foo(a as Any?)) return "fail"
return "OK"
}