No warning or error indication for named parameter use on java interop classes given

Hi idk if this is a known issue or if it’s an issue at all, but intellij seems to fail to catch errors for this case

I came across this when using the kotlin typealiased java.lang.Exception class
if I use named parameters for its construction:

Exception(
    message = "message",
    cause = SomeException()
)

intellij doesn’t produce any warnings or redlines for this, but I get this error at compile time

Cannot find a parameter with this name: message

I did some research and found out about why java interop classes don’t support named arguments, but wasn’t able to find out why no warnings were given for this use by the ide

any ideas or related reading materials are welcome
thanks!

This is a bug https://youtrack.jetbrains.com/issue/KTIJ-12824

2 Likes