Arun M
06/30/2023, 3:21 AMephemient
06/30/2023, 3:40 AMArun M
06/30/2023, 3:51 AMArun M
06/30/2023, 5:31 AMimport java.awt.GraphicsEnvironment
fun main() {
_println_("Hello nativeS")
}Joffrey
06/30/2023, 6:14 AMArun M
06/30/2023, 6:18 AMephemient
06/30/2023, 6:19 AMephemient
06/30/2023, 6:19 AM.main.kts script that'll work anywhere a kotlinc binary is availableArun M
06/30/2023, 6:31 AMKlitos Kyriacou
06/30/2023, 8:30 AMassert in that context. assert is meant only for debugging or confirming code correctness and only turned on if you explicitly enable it on the command line. In your situation, I would use check.ephemient
06/30/2023, 9:08 AMassert function is a bit different than Java's assert statement in that the condition is always evaluated by default (-Xassertions=legacy), instead of following the JVM's -ea, although the actual throw AssertionError are still controlled by -ea by default. given how tricky it is, I would also suggest to avoid assert which was already a mostly-bad idea in Java