-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JS IR] De-optimize equality operator as workaround for KT-57509
(cherry picked from commit 32d1fba)
- Loading branch information
1 parent
79d3dda
commit 5801279
Showing
6 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/BoxJsTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsBoxTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrBoxJsES6TestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrBoxJsTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
js/js.translator/testData/box/dynamic/lambdaParameterInlining.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// WITH_STDLIB | ||
|
||
fun demo(x: dynamic, a: Array<out dynamic>): Boolean? { | ||
return a.any { y: Any -> | ||
val newX: Any = x.unsafeCast<Any>() | ||
y == newX | ||
} | ||
} | ||
|
||
data class X(val x: Int) | ||
|
||
fun box(): String { | ||
|
||
if (demo(X(1), arrayOf(X(1))) != true) return "fail" | ||
|
||
return "OK" | ||
} |