Skip to content

(🐞) Wrong error code on bare enum literal #13236

Closed
@KotlinIsland

Description

@KotlinIsland
from enum import Enum

class E(Enum):
    A = 1
    
a: E.A  # error: Invalid type: try using Literal[E.A] instead?  [misc]
b: 1   # error: Invalid type: try using Literal[1] instead?  [valid-type]

I'll fix this when I'm free.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions