Hello! I ran into a problem: When using the typea...
# intellij
i
Hello! I ran into a problem: When using the typealias Exception with a naming argument the compiler throw error
@SinceKotlin("1.1") public actual typealias Exception = java.lang.Exception
Copy code
throw Exception( message = "TEST" )
Copy code
> Task :microservice:payment:compileKotlin FAILED
e: /var/www/backend-services/microservice/payment/src/main/kotlin/com/icerockdev/microservice/payment/application/usecase/CardCreateUseCase.kt: (39, 19): None of the following functions can be called with the arguments supplied: 
public final fun <init>(): kotlin.Exception /* = java.lang.Exception */ defined in kotlin.Exception
public final fun <init>(p0: String!): kotlin.Exception /* = java.lang.Exception */ defined in kotlin.Exception
public final fun <init>(p0: String!, p1: Throwable!): kotlin.Exception /* = java.lang.Exception */ defined in kotlin.Exception
public final fun <init>(p0: String!, p1: Throwable!, p2: Boolean, p3: Boolean): kotlin.Exception /* = java.lang.Exception */ defined in kotlin.Exception
public final fun <init>(p0: Throwable!): kotlin.Exception /* = java.lang.Exception */ defined in kotlin.Exception
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions

FAILURE: Build failed with an exception.
If use
throw Exception("TEST" )
that build pass correctly. On the compiler side, everything seems fine, but probably IDE should make a check by itself.
a
This is https://youtrack.jetbrains.com/issue/KT-28832 IDE: No error highlighting of Java typealias with named argument
👌 1