mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 08:31:29 +00:00
This is a hack required to accept [potentially] incorrect input provided by the front-end; see KT-46042.
19 lines
524 B
Kotlin
Vendored
19 lines
524 B
Kotlin
Vendored
// FILE: kt45853.kt
|
|
open class MyProblem() : ThrowableProblem() {
|
|
override fun getCause(): Exceptional? = super.cause
|
|
}
|
|
|
|
// FILE: Exceptional.java
|
|
public interface Exceptional {
|
|
Exceptional getCause();
|
|
}
|
|
|
|
// FILE: ThrowableProblem.java
|
|
public abstract class ThrowableProblem extends RuntimeException implements Exceptional {
|
|
@Override
|
|
public ThrowableProblem getCause() {
|
|
// cast is safe, since the only way to set this is our constructor
|
|
return (ThrowableProblem) super.getCause();
|
|
}
|
|
}
|