Skip to content

Wrong report during when match when block (wrong REDUNDANT_ELSE_IN_WHEN) #190

@Decodetalkers

Description

@Decodetalkers
Image

kotlin-lsp said the else is needless, but in fact it is

sealed class Resource<out T> {
    data object Loading : Resource<Nothing>()
    data object Begin : Resource<Nothing>()
    data class Success<out T>(val data: T) : Resource<T>()
    data class Failure(val message: String) : Resource<Nothing>()
}

so it was a wrong report

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions