

Why and how to use suspending functions to perform network requests. No prior knowledge of coroutines is required, but you're expected to be familiar with basic Kotlin syntax. Cool.In this tutorial, you'll learn how to use coroutines in IntelliJ IDEA to perform network requests without blocking the underlying thread or callbacks. So… err… that's a long way of saying "nope". I checked what happens if I tried to use that sealed interface in a different package: In some sense, sealed classes are similar to enum classes: the set of values for an enum type is also restricted, but each enum constant exists only as a single instance, whereas a subclass of a sealed class can have multiple instances, each with its own state.

The docs say this, which makes a kind of sense: If it wasn't a sealed interface, then anything else could implement it, so I'd either need to handle that here, or have an else. The compiler knows that the only two possible options for a SomeSealedInterface are one of either a SomeSealedImplementation or a SomeOtherSealedImplementation: there can be no other options. The key bit here is not so much what I'm testing, it's that the when expression doesn't need an else option. Val result = handleSomeSealedInterfaceInstance(testObj) Val testObj = SomeSealedImplementation("some property value") In Kotlin a todo is not just a marker of guilt and a pretence one will come back and finish things later, but an actual function: of the TODO function")Ĭlass TodoTest `It should throw a NotImplementedError`() My mindset was "OK, I need to do to make the koans exercise pass, but what is that all about?" And today I shall continue.

I used the koans as a jumping off point to look at stuff.
