Skip to content

sentinels incompatible with TypeForm #4865

Description

@Viicos

Describe the Bug

from typing_extensions import TypeForm, reveal_type, sentinel

MISSING = sentinel('MISSING')

class A[T]:
    def __init__(self, t: TypeForm[T])-> None: ...


# Argument `MISSING` is not assignable to parameter `t` with type `TypeForm[@_]` in function `A.__init__`
a = A(MISSING)

reveal_type(a)  # A[Unknown]

Sandbox Link

https://pyrefly.org/sandbox/?project=v2.pZQ7C8IwFIX_yoUOqUuzO9lFcVAEdVIxRUMt6o208fHzPbcvLKIIriH3_Z3zg2Vu7cNblpFa8cvNhy4_d8wHAFn2GduTHGkyns_H0xGabl5DVb-p8oqVGOPVYvNZib7flsK_XgMTRVEkKdYcUJyn1zMqkKmzG1EAViimiZ2KyZF3OFkOuuB1ZLyhe-YPMp4l0xYYbDeI5VZ_ZOKo6ccAbYwSh3WRcoKX2cOkR4RmVks-srszDv3OR0Cz6oHqVcMZAVZ6hf-iHkYKYL2WDt5fir7WTbjLU21Z792u0J0ITSKF5JZkpat305EreS6Q9h8wVcWl-oalEirx4ytpTw

(Only applicable for extension issues) IDE Information

version 1.2.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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