jessewilson
03/04/2024, 4:26 PMkotlinx.datetime.Instant in a unit test and my code compiled just fine. What’s happening?
Here’s the file that incorrectly compiles, and a screenshot showing that IntelliJ doesn’t mind that I forgot the import.Oleg Yukhnevich
03/04/2024, 4:39 PMInstant in okio package in test module link
2. And it's actualized by kotlinx.datetime.Instant here (for all targets except Wasm)
So in your zlib sourceSet you have imported by default okio.Instant , and because zlib sourceSet is a common for jvm+native, and so it's actualized via a typealias to kotlinx.datetime.Instant , you have just Instant=kotlinx.datetime.Instant
no magic in the end 🙃jessewilson
03/04/2024, 4:52 PMjessewilson
03/04/2024, 4:52 PMjessewilson
03/04/2024, 4:54 PMOleg Yukhnevich
03/04/2024, 4:56 PMInstant here in IDEA it will redirect directly to kotlinx.datetime.Instant instead of typealias in a project
Still, IDEA shows a lot of useful information during typing 🙂