CLOVIS
10/27/2025, 8:07 PMimport io.ktor.http.HttpStatusCode.*
@Serializable
private data class NotFound(val id: String)
val f = foo<NotFound>(NotFound)
| |
| HttpStatusCode.NotFound
data class NotFoundYoussef Shoaib [MOD]
10/27/2025, 8:18 PMNotFound as a value stands for nothing. I see how it can be a little confusing. You need to remember that values and types are completely different namespaces (although companion objects, and objects in general, blur that line), so the value NotFound is not necessarily related to the type NotFound.
In fact, imagine you just had a local variable val NotFound. this same situation would occur. We just usually don't name variables with an uppercase letterCLOVIS
10/27/2025, 8:19 PM