Skip to content

false error "Name "..." is not defined" when a valid symbol is used in a type position #11520

Open
@KotlinIsland

Description

@KotlinIsland
from typing import cast

class Test:
    a: int
    
t = Test()

cast(t.a, int)  # error: Name "t.a" is not defined

This leave me being like:
image

Till I realize that I got the args the wrong way around.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions