Usage of Kotlin internal declaration from different module

Bob B's Avatar

Bob B

11 Nov, 2024 12:05 AM

I get the error:

'Usage of Kotlin internal declarations from Java'

when I try the following code:
var account = accountBook.getRootAccount();

This used to work, what am I doing wrong?

The following works:
var account = accountBook.getRootAccount$core();

but it's not documented

  1. 1 Posted by Stuart Beesley ... on 11 Nov, 2024 08:11 AM

    Stuart Beesley (Mr Toolbox)'s Avatar

    It’s not an error, it’s a warning. The command:

    var account = accountBook.getRootAccount();
    

    Should still work fine. It’s an internal quirk that I have discussed with the developer before and he does not want to fix/change it.

    Please confirm it does actually work?

  2. 2 Posted by Bob B on 11 Nov, 2024 11:06 AM

    Bob B's Avatar

    it works. I changed the editor 'error' into a weak warning so it doesn't look like I have errors in my code. I didn't realize it wasn't a compile error.

    Go to File > Settings > Editor > Inspections > Kotlin > Java interop issues > Usage of Kotlin internal declarations from Java.

  3. 3 Posted by Stuart Beesley ... on 11 Nov, 2024 01:19 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    It would be interesting to know:
    - what IDE you are using? - are you writing code in Kotlin? - are you using devkit jar, or the live moneydance.jar from the app package?

    Thanks.

  4. 4 Posted by Bob B on 11 Nov, 2024 09:03 PM

    Bob B's Avatar

    I'm using Intellij, coding in java, using package jar

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac