Is it a kotlin bug if a non nullable class constru...
# multiplatform
r
Is it a kotlin bug if a non nullable class constructor parameter is null at
init {...}
? If I make it wait for ex. 1 second with coroutines it works and the value is not null. The parameter is immutable.
e
there really isn't a solution without breaking compatibility with Java initialization though. at best some more cases could be warned about
r
The issue linked by you talks about uninitialized values by means of them being declared but not yet set. In my case it's a class constructor parameter.
Bump
👎 2
j
Lol, don't bump so quickly
Do you have a bit of example code?
bump
c
Seriously, stop bumping everyone in the channel, you've already been warned. Bumping the thread is one thing, but everyone else doesn't need a notification.
r
ok, i will stop
j
Also; try to provide some more details. I looked at the file linked but don't know exactly what the issue is. Which line, which variable?
r
oh, i sent the wrong file, the right one is -> https://github.com/libki-kt/LOGik/blob/main/Behaviour/ConsoleLoggingBehaviour/src/[…]lin/org/duckdns/libki/LOGik/consoleLogger/BasicConsoleLogger.kt
Copy code
class BasicConsoleLogger(
    val blockingRules: BlockingRulesConfigurationScope.() -> Unit = {}
) : Logger(<http://LogLevel.Info|LogLevel.Info>) { ... }
and the
blockingRules
constructor parameter