Shadow addSuppressed member with an extension

#KT-38777
This commit is contained in:
Ilya Gorbunov
2020-06-06 04:01:41 +03:00
parent 95625d0fae
commit 41131e46d7
3 changed files with 8 additions and 1 deletions
@@ -81,6 +81,11 @@ class ExceptionJVMTest {
e1.addSuppressed(e2)
}
@Test fun addSuppressedSelfDoesNotThrow() {
val e1 = Throwable()
e1.addSuppressed(e1) // should not throw
}
@Test fun circularCauseStackTrace() {
val e1 = Exception("cause")
val e2 = Error("induced", e1)