Add -Xsanitize-parentheses to workaround ASM 6.1 issue in frame computation

#KT-29475 Fixed
This commit is contained in:
Alexander Udalov
2019-01-30 14:27:56 +01:00
parent dfb379d999
commit db487a622a
17 changed files with 163 additions and 3 deletions
+24
View File
@@ -0,0 +1,24 @@
// !SANITIZE_PARENTHESES
// IGNORE_BACKEND: JS, JS_IR
// Sanitization is needed here because of an ASM bug: https://gitlab.ow2.org/asm/asm/issues/317868
// As soon as that bug is fixed and we've updated to the new version of ASM, this test will start to pass without sanitization.
// At that point, we should remove the -Xsanitize-parentheses compiler argument.
// Also don't forget to disable this test on Android where parentheses are not allowed in names
class `()` {
fun `()`(): String {
fun foo(): String {
return bar { baz() }
}
return foo()
}
fun baz() = "OK"
}
fun bar(p: () -> String) = p()
fun box(): String {
return `()`().`()`()
}