opshin icon indicating copy to clipboard operation
opshin copied to clipboard

isinstance checks in list filter expressions don't perform a type cast

Open nielstron opened this issue 5 months ago • 0 comments

Describe the bug when writing [x for x in xs if isinstance(x, Y)], the type of x is not correctly cast to Yas one might expect.

To Reproduce Testcases added in dd526c0f7c9b71f234cc33f9db7b26f0ea4794a3

Expected behavior xshould have type Yin this expression

nielstron avatar Sep 05 '24 12:09 nielstron